Make n/a go away

M

MacScott

I remember from my Lotus 123 days that you could tell lotus to supres
error messages thus a cell with n/a would appear empty and when th
formula had something to do, that answer would show up.

I am making a spreadsheet with multiple instances of formulas waitin
on data and would like for all those n/a to go away with out going i
and editing every formlula with iserror checking.

Can we do this?
 
D

Dave R.

You can use conditional formatting.

Select cell or range, go to format>conditonal formatting. Select "formula
is" and enter =iserror(b1)

where B1 is whatever cell you're in. Then you can select the format to be
white font (if you have white background), so you wont see it. Then you can
copy it elsewhere by coping/paste special formats.
 
G

Gord Dibben

If you have many formulas to change use this code.

Sub NATrapAdd()
Dim myStr As String
Dim cel As Range
For Each cel In Selection
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(ISNA*" Then
myStr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(ISNA(" & myStr & "),""""," & myStr & ")"
End If
End If
Next
End Sub

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top