If And statement

  • Thread starter Thread starter Cheekyaardvark
  • Start date Start date
C

Cheekyaardvark

Can anybody help me out with a formula....

See below
A B C
D E
04 01 ++++++++ 01 03

I am trying to build a statement that says if C = ++++++++ and E = 03
then return VC, if C = ++++++++ and E = 02 then return PC otherwise
return OK

I tried this but I cannot get it to work
=IF(AND(C2="++++++++",E2="03"),"VC",if(C2="+++++++
+",E2="02"),"PC","OK")

Any help will be appreciated!!
 
Try this amendment:

=IF(AND(TRIM(C2)="++++++++",E2="03"),"VC",IF(AND(TRIM(C2)="+++++++
+",E2="02"),"PC","OK"))

Another thing to check is that the numbers in E are text values, and
not numbers that have been formatted to show a leading zero. This
variation might do the job:

=IF(AND(TRIM(C2)="++++++++",--E2=3),"VC",IF(AND(TRIM(C2)="++++++++",--
E2=2),"PC","OK"))

Hope this helps.

Pete
 
Back
Top