View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sunrays17 Sunrays17 is offline
external usenet poster
 
Posts: 4
Default Is the first character a number or letter

On Jan 31, 12:25 am, Elkar wrote:
Could you give some examples of what you mean?



"Sunrays17" wrote:
Hi there...


i am looking forward to know is there any formula to know if a value
is alphanumeric too, as well as its a number or a letter...


Take care...
Sunrays17


On Jan 30, 11:41 pm, Elkar wrote:
This is a bit more involved, but this will also tell you if the first
character is something other than a letter or number.


=IF(A1="","",IF(AND(CODE(LEFT(A1,1))=48,CODE(LEFT (A1,1))<=57),"Number",IF(**OR(AND(CODE(LEFT(A1,1)) =65,CODE(LEFT(A1,1))<=90),AND(CODE(LEFT(A1,1))=9 7*,*CODE(LEFT(A1,1))<=122)),"Letter","Other")))


HTH,
Elkar


"bactfarmer" wrote:
I need a formula that tells you if the first character in a string is
a number or a letter.


Thanks
Very Cunfused- Hide quoted text -- Show quoted text -- Hide quoted text -


- Show quoted text -


Well... exactly don have any examples as i amjut trying it out...
but still...

consider A1 as "A155AbAAn", than giving
"=IF(A1="","",IF(AND(CODE(LEFT(A1,1))=48,CODE(LEF T(A1,1))<=57),"Number
",IF(**
OR(AND(CODE(LEFT(A1,1))=65,CODE(LEFT(A1,1))<=90), AND(CODE(LEFT(A1,1))
=97*,*CODE(LEFT(A1,1))<=122)),"Letter","Other")))" ,


the output is either "Letter", or "Number"....

if we can get "Aplhanumeric" tooo....


Regards,
Sunrays17