View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JohnI in Brisbane JohnI in Brisbane is offline
external usenet poster
 
Posts: 28
Default Column Number/Letter Substitute

John,

I have shown two examples below. Hope they help.

Sub test()
Dim MyVal As Integer
MyVal = 10

' method 1 using "Chr" function
' Note: Chr(MyVal + 64) returns "J".
Range("A19:" & Chr(MyVal + 64) & "26").Select

' method 2 using "Cells" property.
' Note: Cells parameters are "Row, Column".
Range(Range("A19"), Cells(26, MyVal)).Select

End Sub


regards,

John in Brisbane


"John Wilson" wrote in message
...
mudraker,

Wasn't what I was looking for.

More like:

Range("A19:" & Col(10) & "26").Select
Of course, the above doesn't work.

The 10 is a variable that can change.

John