View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MikeM MikeM is offline
external usenet poster
 
Posts: 64
Default Mulit-column number formatting

I'm trying to format a sequence of columns, but without success. I've used:

Sub x()

Dim i As Integer, iCol As Integer

For i = 1 To 47
iCol = 12 + 7 * (i - 1)
Range(Cells(, iCol), Cells(, iCol + 2)).NumberFormat = "0.00"
Next i
End Sub

I've tried columns(icol, icol+2) as well. Any ideas?

TIA,
Mike