Page 1 of 1

From numbers to letters

Posted: Thu Sep 29, 2016 12:56 am
by tvonbrasch
Hi

how can I go from a number to a letter in the alphabet?

I have a loop where i have identfied that i want to set a line in column 2. but when using the setlines command I have to specify this as column B, and not column 2.

Code: Select all

table.setlines(B) +r
If I know the number of the column I want to change, how can I easily find the appropriate letter representing that column using program code?

Thomas

Re: From numbers to letters

Posted: Thu Sep 29, 2016 11:44 pm
by tvonbrasch
The best way I have found so far is to do it manually

Code: Select all

for %col %letter 1 A 2 B 3 C 4 D 5 E 6 F .... next
Thomas

Re: From numbers to letters

Posted: Fri Sep 30, 2016 7:44 am
by johansamuelsson
Use @chr

Code: Select all

For !i = 1 To 26 %cl{!i} = @Chr(!i+64) Next table.setlines({%cl2}) +r
Regards Johan

Re: From numbers to letters

Posted: Fri Sep 30, 2016 9:06 am
by tvonbrasch
Perfect Johan, thanks!
Thomas