How to replace #N/A with 0

dmb41

Board Regular
Joined
Nov 10, 2010
Messages
75
I have a sheet with formulas throughout and several " #N/A ". Is there a way to replace all these #N/As with 0 or something else with out manually replacing all.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi there,

Sure there is, but are you sure you want to do that? I'm assuming these are formulas which have returned an #N/A error. ?? If so, do you want to replace the actual formula with a value of 0? If your data changes, you would not have a formula there anymore. It would probably be better to use error trapping in your formula with an IF() function.

Example:
=IF(ISNA(yourformulahere),0,yourformulahere)

If you're using 2007 or later, you can make use of the IFERROR() function.

Example:
=IFERROR(yourformulahere,0)

If you just want to replace all #N/A errors of a formula result, you'll need to do it either via hand or use VBA, as the Replace functionality won't work on formula results. If you have it as text, just use the Replace functionality (Ctrl + H). If you have a formula return (with the NA() function) you'll need to do it manually or use VBA, as the Replace functionality won't work on these formula results either.

I would recommend, if you have formulas returning the N/A error, you utilize the above type(s) of error trapping for your formulas. You only need to do this once.
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

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