View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] r.w.frederick@gmail.com is offline
external usenet poster
 
Posts: 1
Default Find/Replace Macro with format changes to the replacing number

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