Trying to surround a vlookup with iferror

MurphDog

Board Regular
Joined
Oct 1, 2015
Messages
54
Office Version
  1. 365
Platform
  1. Windows
I updated my vlookup formula to the following so that blank cells (aka date format 1/0/1900) in column 6 return a blank cell.

=IF(LEN(VLOOKUP($I6,$B$5:$G$49,6,0))=0,"",VLOOKUP(I6,$B$5:$G$49,6,0))

It works when there is a value to lookup. But as expected, I get a N/A error when cells in the I column are blank.

Tried adding a IFERROR formula around it but I'm doing it wrong somehow. Please advise.

=IFERROR((LEN(VLOOKUP(I6,$B$5:$G$49,6,0))=0,"",VLOOKUP(I6,$B$5:$G$49,6,0)),"")

I have other if error functions in my spreadsheet that work just fine...
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
How about

=IFERROR(IF(LEN(VLOOKUP($I6,$B$5:$G$49,6,0))=0,"",VLOOKUP(I6,$B$5:$G$49,6,0)),"")
 
Upvote 0
How about

=IFERROR(IF(LEN(VLOOKUP($I6,$B$5:$G$49,6,0))=0,"",VLOOKUP(I6,$B$5:$G$49,6,0)),"")


Sure enough, that did it. For some reason, i thought I would be replacing the existing IF statement, thinking that by not keeping the existing IF in there, it would automatically default to IF, somehow. I don't know.

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

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