By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

running alphabet

P: n/a
I need an algorithm that converts a number to a letter .. like say 1 to
A ... 26 to Z , 27 - AA etc...

any help

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ke*********@gmail.com wrote:
I need an algorithm that converts a number to a letter .. like say 1 to
A ... 26 to Z , 27 - AA etc...


Interesting. Let's air code:

Function Letterize(nIn as long)as string
dim cRes as string
dim nLocal as long
cres=""
do until nlocal=0
cres=cres & chr(asc("a")+(nlocal mod 26))
nlocal=int(nlocal/26)
loop
letterize=cres
end function
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.