I want to vlookup B2 on Sheet2 A:Z and return column 2 (false). So obviously that's just =vlookup(B2,Sheet2!A:Z,2,falase)
However I only want to return the answer IF C2 =Sheet2!F2 on the row where the vlookup is found.
I want to vlookup B2 on Sheet2 A:Z and return column 2 (false). So obviously that's just =vlookup(B2,Sheet2!A:Z,2,falase)
However I only want to return the answer IF C2 =Sheet2!F2 on the row where the vlookup is found.
Try this:
=IF(VLOOKUP(B2,Sheet2!A:Z,2,FALSE)=Sheet2!F2,VLOOKUP(B2,Sheet2!A:Z,2,FALSE),"")
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
That doesn't quite do what I want because C2 and F2 will generally be the same so in your formula it sees that indeed C2 = F2 on Sheet2 and therefore it does the second vlookup which obviously returns an answer albeit the wrong one.
It needs to do the last bit first and then only return something if Cx = Fx Sheet 2. Where x is the row where the vlookup is done.
It would help us to help you if you could show us a sample of your set up and manually include the expected results where applicable.
To upload a sample workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
You keep using the word 'obviously'. What is obvious to you may well not be so to others. Attach a sample workbook so that we don't have to play guessing games, please.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks