Jan 19, 2006 #1 ASPVBNerd Programmer Nov 23, 2005 83 SE I would like to catch the next letter of the alphabet, but I dont know how. For i = 1 to 27 debug.print i + alphabet letter Next Would like the result to be like this. 1a 2b 3c
I would like to catch the next letter of the alphabet, but I dont know how. For i = 1 to 27 debug.print i + alphabet letter Next Would like the result to be like this. 1a 2b 3c
Jan 19, 2006 #2 gmmastros Programmer Feb 15, 2005 14,912 US debug.print i & chr(i + 96) -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom Upvote 0 Downvote
debug.print i & chr(i + 96) -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
Jan 19, 2006 #3 HarleyQuinn Programmer Jan 15, 2003 4,769 GB A simplish way would be to use: Code: For i = 1 To 26 Debug.Print i & Chr(i + 96) Next The Chr function used this way converts the the ascii values of the letters (which start at 97 for the lower case, hence the + 96) into the letters. Hope this helps HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
A simplish way would be to use: Code: For i = 1 To 26 Debug.Print i & Chr(i + 96) Next The Chr function used this way converts the the ascii values of the letters (which start at 97 for the lower case, hence the + 96) into the letters. Hope this helps HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.
Jan 19, 2006 #4 HarleyQuinn Programmer Jan 15, 2003 4,769 GB Too fast for me there George... HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
Too fast for me there George... HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.
Jan 19, 2006 #5 gmmastros Programmer Feb 15, 2005 14,912 US But I like the way you think, HarleyQuinn! -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom Upvote 0 Downvote
But I like the way you think, HarleyQuinn! -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
Jan 19, 2006 Thread starter #6 ASPVBNerd Programmer Nov 23, 2005 83 SE Wonderful. Many thanks George Upvote 0 Downvote
Jan 19, 2006 #7 HarleyQuinn Programmer Jan 15, 2003 4,769 GB HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.