Can I use a between clause or in clause on an IF statement

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

Guest

I have this statement in a cell:

=IF(RIGHT(C12,1)="1",TEXT(0,"00")

Which states that when C12 last digit ends in a 1 then put 00 in C13

I want to do the same if C12 last digit ends in [A]-[E] I know how to do it
in SQL not in Excel programming though.

thanks
 
=IF(OR(RIGHT(C12,1)="1",AND(UPPER(RIGHT(C12,1))>="A",UPPER(RIGHT(C12,1))<="E")),"00","")
 
Thanks tom

Tom Ogilvy said:
=IF(OR(RIGHT(C12,1)="1",AND(UPPER(RIGHT(C12,1))>="A",UPPER(RIGHT(C12,1))<="E")),"00","")

--
Regards,
Tom Ogilvy


ssciarrino said:
I have this statement in a cell:

=IF(RIGHT(C12,1)="1",TEXT(0,"00")

Which states that when C12 last digit ends in a 1 then put 00 in C13

I want to do the same if C12 last digit ends in [A]-[E] I know how to do it
in SQL not in Excel programming though.

thanks
 
Back
Top