Vlookup with IF and OR statements

dbarbella

New Member
Joined
Jun 6, 2017
Messages
32
Hey Gang,
Having a hard time working out the right syntax for this.

I have a working formula that checks if a cell (5th column) in another sheet is not blank.
If it's not blank, it places an asterisk in the cell holding the formula

=IF(VLOOKUP($B4,'Other Sheet Name'!$B$4:$S,5,False)<>"","*","")

I need to expand on this, and check if either of 2 cells is blank

So same formula, but....
Check if cell 5 OR 10 (in the other sheet) has a value
If either (doesn't have to be both) has a value then place an asterisk in the cell holding the formula

I'm just having a tough time getting the formula syntax correct for that.

Thanks so much for any help or advice.

-Dave
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi,

You're missing a cell reference above $B$4:$S?, I just used 5, since you're looking up 2 different columns, something like this:

=IF(OR(VLOOKUP($B4,'Other Sheet Name'!$B$4:$S5,5,FALSE)<>"",VLOOKUP($B4,'Other Sheet Name'!$B$4:$S$5,10,FALSE)<>""),"*","")
 
Upvote 0
Let's suppose that the other sheet is Sheet2.

If the VLOOKUP bit is expected to return text, we can have in Google Sheets...

=IF(isna(ArrayFormula(lookup(rept("z",255),vlookup($B4,Sheet2!$B$4:$S,{5,10},false)))),"","*")

If the VLOOKUP bit expected to return a numeric value, we can have in Google Sheets...

=IF(isna(ArrayFormula(lookup(9.99999999999999E+307,vlookup($B4,Sheet2!$B$4:$S,{5,10},false)))),"","*")

If both possible...

=iferror(if(or(vlookup($B4,Sheet2!$B$4:$S,5,False)<>"",vlookup($B4,Sheet2!$B$4:$S,10,False)<>""),"*",""),"")
 
Upvote 0

Forum statistics

Threads
1,216,756
Messages
6,132,535
Members
449,734
Latest member
AlphaPro

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