How to make cell blank if #N/A

Excelo

New Member
Joined
Apr 7, 2011
Messages
17
Hi All,

I have a cells with a formula that references a table, =HLOOKUP($D$6,Benefits,2,FALSE)


Not all cells are used all the time and appear with #N/A. I want to maintain the formula, but if it returns #N/A I want cell to appear blank. If I can do this with conditional formatting that would be great. Then I won't have to change each cell's formula.

Thanks so much for your help.
 

Some videos you may like

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.

MrKowz

Well-known Member
Joined
Jun 30, 2008
Messages
6,653
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Try:

Excel 2003 or older:
=IF(ISERROR(HLOOKUP($D$6,Benefits,2,FALSE)),"",HLOOKUP($D$6,Benefits,2,FALSE))

Excel 2007 or newer:
=IFERROR(HLOOKUP($D$6,Benefits,2,FALSE),"")
 

Excelo

New Member
Joined
Apr 7, 2011
Messages
17
Thank You!

Is there a way to make #N/A's blank with conditional formatting? or a way to easily change each formula to =IFERROR(HLOOKUP($D$6,Benefits,2,FALSE),"")?

I already filled majority of worksheet out with just the HLookup
 

Watch MrExcel Video

Forum statistics

Threads
1,122,491
Messages
5,596,474
Members
414,070
Latest member
DuncanLucas

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
Top