Simple if statment just not coming to me

  • Thread starter Thread starter Nelson
  • Start date Start date
N

Nelson

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state "no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help
 
THANKS, however now I have a follow up if I may

I need to add another variable

so if C2 begins with ABC say "YES ABC" if it begins with DEF say "Yes DEF"
anything else say "NO"

How would that work, I tried ORs but again its not coming to me?

Thanks in advanvce
 
=IF(LEFT(A1,3)="ABC","Yes ABC",IF(LEFT(A1,3)="DEF","Yes DEF","No"))
 
Give this a try...

=IF(OR(LEFT(A1,3)={"ABC","DEF"}),"Yes "&A1,"No")

If you can enter lower or mixed case "ABC" and/or "DEF", and if you always
want upper case "ABC" and/or "DEF" following the word "Yes", then use this
instead...

=IF(OR(LEFT(A1,3)={"ABC","DEF"}),"Yes "&UPPER(A1),"No")
 

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