Number of digits problem

  • Thread starter Thread starter James8309
  • Start date Start date
J

James8309

Hi everyone

I have this number in Cell A1 = 6190099009

Obviously " =Len(A1) will return 10, =Left(A1,1) will return 6.

If I combine this conditions together: (Return "True" if it starts
with 6 and if it is 10digits.
=if(and(Len(A1)="10",Left(A1,1)="6"),"True","False")

However, it returns "FALSE". Why does it return false when I join them
by "AND"???

Please Help

Thank you.
 
=if(and(Len(A1)="10",Left(A1,1)="6"),"True","False")

the problem is with your quotes

=IF(AND(LEN(A1)=10,LEFT(A1,1)="6"),TRUE,FALSE)

the len(a1)="10" was producing your false

look closeley at how excel was defaulting your len() formula and your left
() formula on a default formatted sheet.
 
Hi everyone

I have this number in Cell A1 = 6190099009

Obviously " =Len(A1) will return 10, =Left(A1,1) will return 6.

If I combine this conditions together: (Return "True" if it starts
with 6 and if it is 10digits.
=if(and(Len(A1)="10",Left(A1,1)="6"),"True","False")

However, it returns "FALSE". Why does it return false when I join them
by "AND"???

Please Help

Thank you.

This seems to work :

=IF(AND(LEN(A1)=10,VALUE(LEFT(A1,1))=6),"True","False")
 
=if(and(Len(A1)=10,Left(A1,1)=6),"True","False")

Hi. You have a solution.
If you would like an alternative...
Note that this returns a Boolean True/False, and not your string "True" or "False"

=QUOTIENT(A1,1E9)=6

--
Dana DeLouis
 
Back
Top