PDA

View Full Version : Formating Macro



keilah
08-20-2007, 04:58 AM
Hi

I need assistance on a macro that well once i have imported the data in a excel worksheet. I have attached the work book

to do the following on the click of a macro button

1. convert the the value in col H to % (2 demical places)

2. Columns G, I, J, K, M, N - to be shown as values in 1000, sepearted by a comma (0 demical places) i.e 23504.000 = 23,504

3. Hide always column L

4. Delete columns O and P always.

thanks.

Bob Phillips
08-20-2007, 05:10 AM
Sub Macro1()
Columns("H:H").NumberFormat = "#,##0.00"
Range("G:G,I:I,J:J,K:K,M:M,N:N").NumberFormat = "#,##0"
Columns("L:L").Hidden = True
Columns("O:P").Delete Shift:=xlToLeft
End Sub


Ain't the macro recorder wonderful?