Posts: 858
Threads: 196
Joined: Apr 2005
How can I get something like
A1
B1
...
Z1
AA1
AB1
...
I tried
Macro
Macro5
int i
str s
for i 0 100
,s.format("%c%i" 'A'+i 1)
,out s
but only works to z1...
Posts: 12,095
Threads: 142
Joined: Dec 2002
Macro
Macro1546
out
int i
str s
for i 0 100
,if(i<26) s.format("%c%i" 'A'+i 1)
,else s.format("%c%c%i" 'A'-1+(i/26) 'A'+(i%26) 1)
,out s
Posts: 858
Threads: 196
Joined: Apr 2005
Posts: 858
Threads: 196
Joined: Apr 2005
Other way:
Function
GetExcelColumnName
function~ n;;1='A'
str cn
rep
,if(n<=0) break
,n-1
,_s.format("%c" 'A'+(n%26))
,cn-_s
,n=n/26
ret cn