View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Using Range & Cell

Hi Jack,

Perhaps try something like:

'=============
Public Sub Tester()
Dim col As Range

For Each col In Range("C:H").Columns
'do something, e.g,:
MsgBox col.Address
Next col
End Sub
'<<=============


---
Regards,
Norman


"Jack" wrote in message
...
I wish to create a macro that will require processing several columns in an
incremental way.
As far as I can tell, I have 2 options :-
1) Use, for example, Cells(x,colnum) with something like an increment
counter [e.g. colnum = colnum+1] but then I need to know how to translate,
say, column CW into a number.
2) Use, for example, Range("CW1") but then how do I increment from CW to
CX to CY etc.


Help appreciated & many thanks

Jack