Vlookup another reference/answer if the first cell is blank

HHHHH

New Member
Joined
Sep 30, 2022
Messages
3
Office Version
  1. 2007
Platform
  1. Windows
Hi

I am trying to get a Vlookup to give me the answer from another cell if the cell that I have looked up to is blank. (It is a spreadsheet from work and I cannot change the layout). I have tried to simplify what I am doing using the example in the picture below.


This is what I have written and it works only if column D is blank. It fails for all of the cells which have something in column D and for those ones it gives me the answer in column B, even though the latest update is in column D.

Does anybody know why?

Please note: the "" are coming out slanted, but they are normal in Excel and I split the formula up to make it easy to see).


=iferror(

if(vlookup(a2,’sheet2’!,$A:$D,4,false)&””=””,

If(vlookup(a2,’sheet2’!,$A:$D,3,false)&””=””,

(vlookup(a2,’sheet2’!,$A:$D,2,false)&””=””,

(vlookup(a2,’sheet2’!,$A:$D,4,false)),

(vlookup(a2,’sheet2’!,$A:$D,3,false)),

(vlookup(a2,’sheet2’!,$A:$D,2,false)),

“”)
Excel screenshot.png


All help will be very much appreciated.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try this:

=LOOKUP("zzz",INDEX(sheet2!$B$2:$D$6,MATCH(A2,sheet2!$A$2:$A$6,0),0))
 
Upvote 0
Try this:

=LOOKUP("zzz",INDEX(sheet2!$B$2:$D$6,MATCH(A2,sheet2!$A$2:$A$6,0),0))
Steve that works on my example :) I am going to try and apply that to my complicated work spreadsheet now. Finger crossed :)
THANK YOU.
 
Upvote 0
Try this:

=LOOKUP("zzz",INDEX(sheet2!$B$2:$D$6,MATCH(A2,sheet2!$A$2:$A$6,0),0))
I managed to apply it correctly to my Excel workbooks in work. Thank you so much! This is going to save so much time :) and I have learnt another formula :).
 
Upvote 0

Forum statistics

Threads
1,214,865
Messages
6,121,988
Members
449,060
Latest member
mtsheetz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top