+ Reply to Thread
Results 1 to 10 of 10

Vlookup results based on IF Function

  1. #1
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Vlookup results based on IF Function

    Hi all. In the attached worksheet, I am trying to get the dates from Column K into column B for each row to the left of the yellow divider if it the criteria of C=M,E=J,L=F is met for a certain. I attemped such a function but get the FALSE Value. I'm guessing it's looking for a match from left to right instead of scanning the columns to find a criteria that matches. The orange highlight indicates what I would like to happen. Please see row 456 (highlighted orange) and row 8168 (highlighted in orange). The date from column k is in column b (highlighted in green) based on the items in orange being the same. I would like to have a formula that can scan and compare what's on the left and right of the yellow divider and import the date to column b from k if there is an exact match based on the 3 criterias set.
    Attached Files Attached Files
    Last edited by numbersdntlie; 12-21-2011 at 12:05 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlook up results based on IF Function

    Invalid attachment... try again, making sure the .xls or .xlsx ending is in tact.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Vlook up results based on IF Function

    Sorry, I pulled it to make some mods, it should be visible now.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup results based on IF Function

    I think it's:

    =IF(AND(C2=M2,E2=J2,F2=L2),K2,"")

    but I am not seeing any matches...

  5. #5
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Vlookup results based on IF Function

    There should be a match from the items I highlighted in orange. Also, in your formula isn't a vlookup function required? I think it's not finding anything because "=IF(AND(C2=M2,E2=J2,F2=L2),K2,"")" is only restricted to those particular cells, instead of searching for the exact cominations in differents rows throughout the worksheet between the two dividers.
    Last edited by numbersdntlie; 12-21-2011 at 12:53 PM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup results based on IF Function

    You can use:

    =IFERROR(INDEX($K$1:$K$10000,MATCH(1,INDEX(($M$1:$M$10000=C2)*($J$1:$J$10000=E2)*($L$1:$L$10000=F2),0),0)),"")

    but it may be a bit slow.

    If you can convert the dates in column K to actual dates... or add a helper in column N with formula: =DATE(RIGHT(K2,4),LEFT(K2,2),MID(K2,3,2)) formatted as Date, to do it for you , then you can use SUMIFS (assuming only one match will occur)....

    =SUMIFS(N:N,M:M,C2,J:J,E2,L:L,F2) and format column as custom: m/d/yy;;;@ to get rid of 0's

  7. #7
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Vlookup results based on IF Function

    Do I put this in front of the vlookup function or is this the only function I need and it will input the date from the other column?

    thanks for your help on this.

  8. #8
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Vlookup results based on IF Function

    I get some dates in there with your formula, but my given example on row 456 doesn't populate a date when I put the formula in there.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup results based on IF Function

    I got 12012011 with first formula and 12/01/2011 with second formula in that cell
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-02-2010
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Vlookup results based on IF Function

    Great, thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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