exclude columns in Macro

  • Thread starter Thread starter shternm
  • Start date Start date
S

shternm

I have a macro below. I would like to exclude columns (c) so that i
reads c= 5 to 8; 10-16 vs. c = 5 To 16.


p = "C:\Documents and Settings\"
f = "stuff.xls"
s = "Sheet1"
Application.ScreenUpdating = False
For r = 12 To 72
For c = 5 To 16
a = Cells(r, c).Address
Cells(r, c) = GetValue(p, f, s, a)
Next c
Next r
Range("D:F,I:K,N:O").Select
Selection.NumberFormat = "#,##0_);(#,##0)"
Application.ScreenUpdating = True

Also, is there a way to identify the columns later on as numbers? So i
would read Range ("5:7, 8:10") instead of ("D:F,I:K,N:O").

Thank
 
Back
Top