• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

=IF() with =Len() strange result

robertaw

New Member
If I type in A1 123456 and then in A2 type the formula =IF(Len(A1)>6,"A","B") I would expect to receive the answer A - but for some strange reason it returns B (i.e.more than 6 characters!!)


I have ensured I have no trailing spaces using both =Clean() and =Trim()


Please, am I doing something wrong or am I using the functions incorrectly?


Thanks Roberta
 
Hi Roberta!


Welcome to the forum..


We are glad that you are here..


regarding you r query..


are you sure..(123456) is greater than 6.. and its Not Equal to 6..


Code:
=IF(Len(A1)>=6,"A","B")


Regards,

Deb
 
Debraj scores!!!


Robert: in regards to your formula and why its returning the "B"


as you know, it will look at the length of A1 (which equals 6 characters) and test to see if it is greater than 6 (which its not)... since the test would result in a Fales, it will go to the ValIfFalse argument and return "B".
 
Back
Top