+ Reply to Thread
Results 1 to 5 of 5

Formula to lookup 2 criteria with dates and value

  1. #1
    Registered User
    Join Date
    08-24-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    69

    Formula to lookup 2 criteria with dates and value

    Hello,

    I will pls. need a formula to automatically distribute the value from another sheet in a monthly basis based on 2 criteria e.i. Invoice # and Invoice date.

    I've attached a file for easy reference. Need formula in range C2:P7 (yellow highlight)

    Thanks in advance for your help

    Ricky
    Attached Files Attached Files
    Last edited by rickyilas; 11-16-2019 at 08:17 AM. Reason: Solved

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    40,647

    Re: Formula to lookup 2 criteria with dates and value

    In D1 copied across:

    =EDATE(C1,1)

    Then in C2 copied across and down:

    =IFERROR(IF(EOMONTH($B2,-1)+1=C$1,INDEX(Sheet2!$C$2:$C$7,MATCH(Sheet1!$A2,Sheet2!$A$2:$A$7,0)),""),"")
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    08-24-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Formula to lookup 2 criteria with dates and value

    Hello Mam Ali,

    Thanks for your help! The formula works perfectly!

    Regards
    Ricky

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    40,647

    Re: Formula to lookup 2 criteria with dates and value

    No problem.

  5. #5
    Valued Forum Contributor
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    634

    Re: Formula to lookup 2 criteria with dates and value

    Sheet1

    C2=IF(Sheet1!$A2<>"",SUMPRODUCT((Sheet2!$A$2:$A$7=Sheet1!$A2)*(MONTH(Sheet1!$B2)=MONTH(Sheet1!C$1))*(YEAR(Sheet1!$B2)=YEAR(Sheet1!C$1))*(Sheet2!$C$2:$C$7)),"")


    copy across and down

    for hide 0 (zero) custom format [=0]""
    Attached Files Attached Files
    Last edited by CARACALLA; 11-16-2019 at 08:31 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Lookup for a date between 2 other dates which matches the given criteria
    By hazeljohn19 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2017, 07:56 AM
  2. [SOLVED] MAX / MIN Lookup with Dates and Other Criteria
    By Fermented Reptile in forum Excel General
    Replies: 5
    Last Post: 12-15-2016, 05:34 AM
  3. [SOLVED] Multiple Criteria whit lookup between dates
    By verschelde.steven in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-16-2015, 03:39 PM
  4. Lookup with criteria / Index match (?) / Using dates
    By RenanCip in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-28-2014, 11:23 AM
  5. Count dates based on lookup Criteria
    By JAUrrutia9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 03:33 PM
  6. Criteria Lookup based on Dates
    By Tyson in forum Excel General
    Replies: 0
    Last Post: 12-19-2005, 03:10 PM
  7. Criteria Lookup based on Dates
    By Tyson in forum Excel General
    Replies: 3
    Last Post: 12-15-2005, 05:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1