+ Reply to Thread
Results 1 to 9 of 9

HELP: Vlookup that needs to match dates

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    28

    HELP: Vlookup that needs to match dates

    Hi Guys,

    Hoping for some help here, been on this for a while. I have attached an example of what I am working on at the moment. Basically I need to determine the revenue of multiple customers for purchases on a specific date.

    I have a sheet called "Returned" that I would like to put the value of the original purchase into. Now the "Purchased" tab has all the purchases from my customers, however I only want to know what the original revenue was on the date "Serviced" by that "Person ID." Sometimes the serviced date in the "Returned" sheet will not exist in the "Purchased" sheet to add to the complexity, in which case I would need it to equal 0.

    For example, cell K2 needs to equal 595 and K3 needs to equal 0, what is the formula I need to look this up?

    Thanks,
    Jason.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: HELP: Vlookup that needs to match dates

    can you use the invoice number at all

    =IFERROR(INDEX(Purchased!$H$2:$H$23,MATCH(B2,Purchased!$B$2:$B$23,0)),0)
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: HELP: Vlookup that needs to match dates

    In K2:

    =IFERROR(INDEX(Purchased!$H$2:$H$23,MATCH(Returned!A2,IF(Purchased!$I$2:$I$23=Returned!I2,Purchased!$A$2:$A$23),0)),0)

    This is an array formula, confirmed using Ctrl+Shift+Enter to exit the cell after the formula is entered, instead of hitting Enter normally.

    Drag down as needed.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    06-26-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: HELP: Vlookup that needs to match dates

    Quote Originally Posted by etaf View Post
    can you use the invoice number at all

    =IFERROR(INDEX(Purchased!$H$2:$H$23,MATCH(B2,Purchased!$B$2:$B$23,0)),0)
    I cannot use the invoice number as sometimes they are incorrect.

  5. #5
    Registered User
    Join Date
    06-26-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: HELP: Vlookup that needs to match dates

    Quote Originally Posted by daffodil11 View Post
    In K2:

    =IFERROR(INDEX(Purchased!$H$2:$H$23,MATCH(Returned!A2,IF(Purchased!$I$2:$I$23=Returned!I2,Purchased!$A$2:$A$23),0)),0)

    This is an array formula, confirmed using Ctrl+Shift+Enter to exit the cell after the formula is entered, instead of hitting Enter normally.

    Drag down as needed.

    This works GREAT! However one problem, what if I have duplicate dates in the purchased sheet, therefore I would want it to sum them up as opposed to just give me the first line of results?

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: HELP: Vlookup that needs to match dates

    hi jason. that would not be a lookup anymore. you can try SUMIFS
    =SUMIFS(Purchased!H:H,Purchased!A:A,A2,Purchased!I:I,I2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  7. #7
    Registered User
    Join Date
    06-26-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: HELP: Vlookup that needs to match dates

    Quote Originally Posted by benishiryo View Post
    hi jason. that would not be a lookup anymore. you can try SUMIFS
    =SUMIFS(Purchased!H:H,Purchased!A:A,A2,Purchased!I:I,I2)
    Brilliant!!!!!!!!!!!

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: HELP: Vlookup that needs to match dates

    FORUM MODERATOR'S REQUEST:

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  9. #9
    Registered User
    Join Date
    06-26-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: HELP: Vlookup that needs to match dates

    Thanks vlady

+ 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. Multiple vlookup that includes date match between two dates
    By dynamoracing in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-15-2013, 09:41 PM
  2. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  3. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 PM
  4. Replies: 2
    Last Post: 03-16-2012, 12:03 PM
  5. Vlookup does not find closest match (dates)
    By Stefan.hagnesten in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2009, 10:38 AM

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