We help IT Professionals succeed at work.

simple excel formula

BR
BR asked
on
90 Views
Last Modified: 2017-03-22
Dear Experts,

=IF(LEFT(D2;1)=5;TRUE;FALSE)

I want to check, if the first letter of D1 is 5, I want to write TRUE otherwise FALSE

what is wrong with my formula?
Comment
Watch Question

Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
BRDigital Marketing

Author

Commented:
thank you
Rob HensonFinance Analyst
CERTIFIED EXPERT

Commented:
The reason why your original was not working is probably because the contents of D1 are text rather than a number. Eventhough you are only looking at the first character and it is a number the fact that it has come from a text string it will be recognised as text.

If you want literally just a TRUE or FALSE result you don't need the IF statement:

=LEFT(D2;1)="5"

Thanks
Rob
BRDigital Marketing

Author

Commented:
Thank you Rob Henson,
it's a beautiful answer

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.