View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
slarbie slarbie is offline
external usenet poster
 
Posts: 53
Default CONDITIONAL STATEMENT

The first response will address your question programmatically. But since
you say you just want a formula, maybe this is what you're looking for.

Assuming your "ABC" or "AB" is entered in cell A1, this formula will say
"Yay" if it matches either one, and "Boo" if it doesn't:
=IF(OR(LEFT(A1,2)="AB",A1="ABC"),"Yay","Boo")

Alternatively, if all you need is a TRUE or FALSE response, the following is
even sympler:
=OR(LEFT(A1,2)="AB",A1="ABC")

Hope that helps...

"RYNNER" wrote:

I HAV A PROBLEM IN CREATING FORMULA, I WISH TO CREATE A FORMULA USING
CONDITIONAL STATEMENTS INVOLVING LETTERS. FOR INSTANCE, IF I ENTER "ABC" THEN
THE FORMULA WORKS. NOW, THIS IS THE PROB, I WISH IT WILL WORK EVEN IF I TYPE
ONLY "AB".. IM TRYIN ASTERISK, BUT IT DOESNT WORK, LIKE "AB*" ... COULD
SOMEONE HELP ME PLEASE..
THANKS IN ADVANCE..