View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Converting numbers to column letters

Range(Chr(col1+64) & ":" & Chr(col2+64))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Hawk" wrote in message
...
In a VBA procedure, I have two integers representing
columns. For example, integers are 1 and 5 are referring
to columns A and E respectively. From the two integers, I
would like to create a string representing the column
letters.

Basically,
1 and 5 should result in "A:E"
2 and 6 should result in "B:F"
3 and 27 should result in "C:AA"

I will be using the string to reference a range of
columns...Range("A:E"). Any ideas would be greatly
appreciated. TIA...