Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default need a function for numbers to characters

Is there a method or function that will take a number and
give me the corresponding character?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default need a function for numbers to characters

Hi Eric

if we're talking about ANSI numbers e.g. 64 = @ and 65 = A etc
then you can use the CHAR function
e.g. =CHAR(A1)

Regards
JulieD

"Eric Marple" wrote in message
...
Is there a method or function that will take a number and
give me the corresponding character?



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default need a function for numbers to characters

If I pass 1 I want A returned, 2 = b, 3 = c and so forth
-----Original Message-----
Hi Eric

if we're talking about ANSI numbers e.g. 64 = @ and 65 =

A etc
then you can use the CHAR function
e.g. =CHAR(A1)

Regards
JulieD

"Eric Marple" wrote

in message
...
Is there a method or function that will take a number

and
give me the corresponding character?



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default need a function for numbers to characters

Eric,

Give this a try...
'-------------------------------------------------
'Jim Cone - August 05, 2004
'Returns alphabetic equivalent of provided number.
'Returns nothing for numbers 256.

Function GetLetters(ByVal ColumnNum As Long) As String
On Error GoTo NoNumber
Dim ColChars As String
ColChars = Columns(ColumnNum).Address(False, False)
GetLetters = Left$(ColChars, 1)
Exit Function
NoNumber:
Beep
GetLetters = vbNullString
End Function

'Call it this way...

Sub GetLetter()
Dim strAlpha As String
strAlpha = GetLetters(25)
MsgBox strAlpha
End Sub
'-------------------------------------------------

Regards,
Jim Cone
San Francisco, CA

"Eric Marple" wrote in message ...
Is there a method or function that will take a number and
give me the corresponding character?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default need a function for numbers to characters

On Thu, 5 Aug 2004 09:18:19 -0700, wrote:

If I pass 1 I want A returned, 2 = b, 3 = c and so forth


If your number is in A1, then =CHAR(A1+64) will give you an "A" for 1, but it
will give you a "B" for 2, not a "b".

What kind of rule do you want to use to decide between "B" and "b" as well as
for the other letters of the alphabet?


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum numbers which contains characters jacobs Excel Discussion (Misc queries) 2 August 15th 09 01:47 PM
sum numbers which contain characters excelFan Excel Discussion (Misc queries) 5 July 31st 09 05:25 PM
Adding numbers or characters to existing numbers Jannie Excel Worksheet Functions 9 February 20th 07 03:08 PM
numbers to characters George Applegate Excel Worksheet Functions 1 July 22nd 06 03:37 PM
characters around numbers ellie Excel Discussion (Misc queries) 3 December 28th 05 09:14 PM


All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"