Vlookup

KVR1980

New Member
Joined
Mar 16, 2021
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
I've written a nested Vlookup formula that looks across two worksheets (see example below). What I need it to do though is, if the two returning cells are empty then I want the cell to show as blank and not a zero. I know you can use an IF statement to achieve this (see 2nd example below), but I cant seem to combine the IF formula with the IFERROR formula that I need to look across the two worksheets.
Please can someone help me?

=IFERROR(VLOOKUP(A1,Sheet2!A:B,2,0),IFERROR(VLOOKUP(A1,Sheet3!A:B,2,0),""))

=IF(VLOOKUP(A1,Sheet2!A:B,2,0)="","",VLOOKUP(A1,Sheet2!A:B,2,0))
 
We need to know whether you are expecting the return value to be a number or text.
If it is Text then you can use the &"" method suggested by @Joe4.
If you are expecting to return a number then that method will convert the numbers that get returned to text.

So if you are expecting numbers unless you have MS365 or O2021 so that you can use the LET function, you will need to do it the long way:
Excel Formula:
=IFERROR(IF(VLOOKUP(A1,Sheet2!A:B,2,0)="","",VLOOKUP(A1,Sheet2!A:B,2,0)),IFERROR(IF(VLOOKUP(A1,Sheet3!A:B,2,0)="","",VLOOKUP(A1,Sheet3!A:B,2,0)),""))
It's dates Im expecting so used this long formula above, which has worked a treat, thank you so much
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
We need to know whether you are expecting the return value to be a number or text.
If it is Text then you can use the &"" method suggested by @Joe4.
If you are expecting to return a number then that method will convert the numbers that get returned to text.

So if you are expecting numbers unless you have MS365 or O2021 so that you can use the LET function, you will need to do it the long way:
Excel Formula:
=IFERROR(IF(VLOOKUP(A1,Sheet2!A:B,2,0)="","",VLOOKUP(A1,Sheet2!A:B,2,0)),IFERROR(IF(VLOOKUP(A1,Sheet3!A:B,2,0)="","",VLOOKUP(A1,Sheet3!A:B,2,0)),""))
It was dates, so this has worked a treat, thanks so much.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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