#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Format Cells

Yep. But I followed you there, too! <vbg

Gord Dibben wrote:

Thanks Dave.

I could change another one I posted to Cindy

Sub color_it()
For Each cell In Selection
cell.Interior.ColorIndex = 3 'red
Next
End Sub

Sub color_it()
Selection.Interior.ColorIndex = 3 'red
End Sub

Gord

On Thu, 17 Jan 2008 18:08:26 -0600, Dave Peterson
wrote:

In fact, instead of applying the number format a cell at a time, you could just
get the whole selection at once:

Sub NumFormat2()
Selection.NumberFormat = "[$Indonesian Rupiah] #,##0.00"
End Sub

Gord Dibben wrote:

As you have found, custom formats are saved with that workbook only.

You could write a macro for the custom format and assign the macro to a button
on a toolbar.

Sub NumFormat()
Dim cel As Range
On Error GoTo endit
For Each cel In Selection
cel.NumberFormat = "[$Indonesian Rupiah] #,##0.00"
Next cel
Exit Sub
endit:
MsgBox "No cells found!"
End Sub

Save the macro in Personal.xls.

Alternative would be create a workbook template with the custom format and use
that template as the basis for all new workbooks.

Existing workbooks would not be affected and would have to be changed on an
individual case.

See this google thread for more info.

http://tinyurl.com/37fmzz

Gord Dibben MS Excel MVP

On Thu, 17 Jan 2008 12:19:01 -0800, GKW in GA
wrote:

It rembers them in the document they were created in, but if you create a
custom format in one document and then want to use it in another document,
then you have to create it over again, which is what I am trying to avoid

I have Excel 2003

"Fred Smith" wrote:

First, you can select a range of cells, then apply the format to the entire
range.

Second, Excel remembers custom formats that you have entered, so you can
just pick the previously entered format from the list.

What version of Excel are you using?

Regards,
Fred

"GKW in GA" wrote in message
...
I use a custom format for cells quite frequently by going to FORMAT | CELLS
|NUMBER | CUSTOM and then specifying the format.

Is there any way to save a custom format for a cell. I use the same custom
format a lot and have to re-key it all the time



--

Dave Peterson
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
How to format cells in Excel 2007 (i.e. currency format)? DonR Excel Discussion (Misc queries) 2 May 25th 08 11:16 PM
how do i format a cell based on format of a range of cells? Chris Hardick Excel Discussion (Misc queries) 2 April 3rd 06 08:54 AM
want format cells alignment not format cells font style Jeannie Bean Excel Discussion (Misc queries) 2 February 10th 06 09:31 AM
Cells won't convert to number format, even after format/cells/num. scottr Excel Discussion (Misc queries) 5 April 12th 05 11:02 PM
When I select "format cells", the format dialog box does not disp. Andy S. Excel Worksheet Functions 2 November 23rd 04 03:49 AM


All times are GMT +1. The time now is 01:19 PM.

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

About Us

"It's about Microsoft Excel"