Find/Replace Macro with format changes to the replacing number

R

r.w.frederick

I'm writing a simple macro to find an replace a specified value #N/A
with the value 0 formated as number with no decimals.

Here is my macro:

Sub FindReplace()
'
' FindReplace Macro
' Macro recorded 6/28/2006 by rwf33989
'
' Keyboard Shortcut: Ctrl+q
'
Cells.Replace What:="#N/A", Replacement:="0", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

How do I change this to make the formatting change? The entire sheet
should be formatted as accounting, but in those instances where a #N/A
is found, I want that value to be replaced with a 0 formated as NUMBER
with no decimal places.

I appreciate any help!

FB
 

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