The Excel function =Char() converts a number to the equivalent ASCII character. So.. =Char(65) is "A" while =Char(97) is "a"
The equivalent VBA function is chr() So, depending on what you're trying to accomplish, you can use an "offset" into this function. That is to say.. if you're trying to prefix a value with a letter, you can use: For inx = 1 to 26 debug.print inx & " = " & chr(inx + 64) next inx to find all of the ascii values, in cell A1, enter: =Char(row()) and copy down to row 255 Paul ________________________________ From: Ayush <jainayus...@gmail.com> To: excel-macros@googlegroups.com Sent: Fri, March 25, 2011 11:40:11 AM Subject: $$Excel-Macros$$ discussexcel : Macro: Column Number to Alphabetical reference Hello everyone, Here is the UDF to convert a number into Alphabetical reference. If you pass 1 to the function, it will Return A. If you pass 26, It will return Z. If you pass 27 It will return AA....and so on. http://www.discussexcel.com/learn-macros/vba-macros Let me know if you have better solution. Thanks and best regards Ayush Jain -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel