Getting excel to recognize 0 in the front

  • Thread starter Thread starter Frank Marchese
  • Start date Start date
F

Frank Marchese

I am trying to setup a worksheet that will take a 3 digit number in one
column and split it using left , right and mid functions to other columns. I
only encounter a problem if the number I want it to breakdown starts with a
0. (i.e. 068). Any ideas how to work around this problem would be greatly
appreciated. Thanks in advance.

F Marchese
 
If it only contains 3 digit numbers you could use something like
=IF(Left(TEXT(A2,"000"),2) = "03,"Three","")

A macro could check what is displayed by checking .text instead of .value
 
Hi F

If you work with real numbers instead of number-looking text then 068 = 68
and Left, Mid, Right is out of question. Try with 68 in A1:
=INT(A1/100)
=MOD(INT(A1/10),10)
=MOD(A1,10)

HTH. Best wishes Harald
 
Thanks for all the help. Figured it out somehow, still not sure what I did
but it works now.
 
Back
Top