VBA - if cell contains #N/A then

wmc5880

New Member
Joined
Jul 8, 2013
Messages
34
Been trying to figure this one out for a while.. Does anyone have a good suggestion?

Just want to loop down the sheet and find/change "#N/A"

If #N/A then.. Problem is that i get an error if the cell contains a value other than N/A.
Maybe there is a formula is not integer?



Code:
For e = 2 To finalRow            
            If Cells(e, 10).Value = CVErr(xlErrNA) Then
                Cells(e, 10).FormulaArray = IndexMatch
                Cells(e, 11).FormulaR1C1 = "=RC[-1]*RC[-3]"
            End If
Next e
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,933
Messages
6,181,843
Members
453,068
Latest member
DCD1872

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