+ Reply to Thread
Results 1 to 4 of 4

Vlookup and If function

  1. #1
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Thumbs up Vlookup and If function

    Dear Expert

    I got a problem with Vlookup and If function


    I have attached the excel file that list out product with price on the date , and purchase on the other day
    the price will be varied according to the date of purchase, how can i get the right Price with IF and Vlookup formular or some better way?


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup and If function

    The price in F4 is wrong, it should be 12.

    B8 also has a space behind Car 2 which should be removed.

    in F3
    =INDEX(C3:C8,MATCH(D3,IF(E3=B3:B8,A3:A8),1),1)
    and copy down

    Array formula, use Ctrl-Shift-Enter
    Last edited by Special-K; 11-02-2016 at 08:49 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Vlookup and If function

    Try this ...

    =INDEX($C$3:$C$8,MATCH(1,(E3=$B$3:$B$8)*(D3>=$A$3:$A$8),0))

    Enter with Ctrl+Shift+Enter.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,151

    Re: Vlookup and If function

    Doesn't work: you need either in separate table for each car OR Car 1 /dates followed by Car 2/dates with dates in ascending order in each case

    Try

    =IFERROR(INDEX($B$11:$F$14,MATCH($D3,INDEX($B$11:$F$14,,MATCH($E3,$B$10:$F$10,0)),1),MATCH($E3,$B$10:$F$10,1)+1),"")

    OR

    =IFERROR(VLOOKUP($D3,OFFSET($A$16,MATCH($E3,$B$16:$B$21,0)-1,,COUNTIF($B$16:$B$21,$E3),3),3,1),"")

    uses new tables see attached.
    Attached Files Attached Files
    Last edited by JohnTopley; 11-02-2016 at 09:51 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] Trying to Multiply the result of an IF function combined with a VLOOKUP function
    By ucca in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-28-2018, 02:32 AM
  2. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  3. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  4. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  5. Replies: 1
    Last Post: 12-02-2005, 09:35 AM
  6. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] vlookup function-Can vlookup command find the data from the 5 sheets.
    By Rishab shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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