Vlookup formula

floggingmolly

Board Regular
Joined
Sep 14, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows
I have the formula below which works. It looks in column 11 and if blank it uses the value in column 12. If the value in H2 isn't in my table array, how can I hide the #N/A error? Any help would be greatly appreciated.

=IF(VLOOKUP(H2,BDS_Alignment,11,FALSE)="",VLOOKUP(H2,BDS_Alignment,12,FALSE),VLOOKUP(H2,BDS_Alignment,11,FALSE))
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
You can use the IFERROR function to catch the error and return any value you like as below.
=IF(VLOOKUP(H2,BDS_Alignment,11,FALSE)="",VLOOKUP(H2,BDS_Alignment,12,FALSE),VLOOKUP(H2,BDS_Alignment,11,FALSE)),"Not Found")
I have the formula below which works. It looks in column 11 and if blank it uses the value in column 12. If the value in H2 isn't in my table array, how can I hide the #N/A error? Any help would be greatly appreciated.

=IF(VLOOKUP(H2,BDS_Alignment,11,FALSE)="",VLOOKUP(H2,BDS_Alignment,12,FALSE),VLOOKUP(H2,BDS_Alignment,11,FALSE))
 
Upvote 0
You can use the IFERROR function to catch the error and return any value you like as below.
=IF(VLOOKUP(H2,BDS_Alignment,11,FALSE)="",VLOOKUP(H2,BDS_Alignment,12,FALSE),VLOOKUP(H2,BDS_Alignment,11,FALSE)),"Not Found")
I tried this but it says There's a problem with this formula.
 
Upvote 0
Did you see Fluff's question?
There are some cool new options in the newer versions of Excel, but we need to know what version of Excel you are running, to determine if they might work for you.
So I recommend you update your account details, like he asked.
 
Upvote 0
So I recommend you update your account details, like he asked.
I've asked the OP the same question in various threads & never got an answer. :(
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I am using 365. Version 2108.
 
Upvote 0
I am using 365. Version 2108.
Can you update your Profile, as instructed in the conversation you just quoted?
This will make it appear in your Profile, so it shows up on ALL of your posts, and will aid helpers with future questions that you ask.

Thanks.
 
Upvote 0
Thanks for that, how about
Excel Formula:
=LET(v,VLOOKUP(H2,BDS_Alignment,11,FALSE), IF(ISNA(v),"",IF(v<>"",v,IFNA(VLOOKUP(H2,BDS_Alignment,11,FALSE),""))))

Please don't forget to update your profile. ;)
 
Upvote 0
Thanks for that, how about
Excel Formula:
=LET(v,VLOOKUP(H2,BDS_Alignment,11,FALSE), IF(ISNA(v),"",IF(v<>"",v,IFNA(VLOOKUP(H2,BDS_Alignment,11,FALSE),""))))

Please don't forget to update your profile. ;)
I tried this and doesn't work. It returns all 0's.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,931
Members
449,480
Latest member
yesitisasport

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