how to do a nested if statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking at values in one column to see if they start with specific 2 or
3 char. then I want to have a result value of 1 of three words. I.E., if the
value contains ab at the beginning then the result in the next column will be
AB, if the value contains abc at the beginning then the result will be abc,
if the value contains def in the beginning then I want the result to be def.
I tried using 3 if statements. That did not work.
 
It would seem you must look at the three characters first. Have you given us
all the things to look for? Are they just: abc, ab and def
=IF(LEFT(A1,3)="abc","ABC",IF(Left(A1,2)="AB","AB",IF(LEFT(A1,3)="DEF","DEF","Not
there")))
best wishes
 
=IF(LEFT(A1,3)="abc","abc",IF(LEFT(A1,2)="ab","AB",IF(LEFT(A1,3)="def","def","none
of the above")))
 
i maybe confused..

<<then I want to have a result value of 1 of three words. I.E.,>>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top