Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace text format jmn13 Excel Discussion (Misc queries) 2 May 25th 06 06:18 PM
Using Find and Replace to replace " in a macro snail30152 Excel Programming 1 April 13th 06 11:58 PM
Replace million-billion number format to lakhs-crores format Sumit Excel Discussion (Misc queries) 1 December 9th 05 04:58 PM
find replace format neeraj Excel Discussion (Misc queries) 6 September 20th 05 05:50 PM
Find/replace format? Gordon[_2_] Excel Programming 4 January 3rd 05 06:27 PM


All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"