Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have a set of worksheets that i want to change the
number formatting on. In some columns there are percentages, always with a header "%" and the rest I want to be in accounting format but is in several different number formats. Some cells are text only. I am working on a macro to search the worksheet for cells that aren't percentages and make them in the accounting format. Heres what I have, can you see where I am going wrong? Sub ChangeNumberFormat() For Each cell In sht.UsedRange IF Selection.NumberFormat = "0.00%" End If With Selection Selection.SpecialCells(xlCellTypeFormulas, 23).Select Selection.NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_ (* ""-""??_);_(@_)" Next cell MsgBox "Process Complete" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions |