Formula Problems

Closed
Simple Matt - Aug 2, 2009 at 04:42 AM
 Trowa - Aug 3, 2009 at 08:07 AM
Hello,

I have a problem with the formula in Excel for mac. I'm trying to compare a cell to multiple other cells to see if they have the same value, and to return a value accordingly.

Example: If cell B2 (value of 2) is equal to A1,C1 trough to M1 I wish "error" to appear in B1, if not then I would like B2 to be represented in B1.

I have tried this formula in cell B1

=IF(B2=(A1,C1:M1),"error",B2

I know the (A1,C1:M1) part is wrong, but I've tried many different way to no success.

I would be grateful for any help.

Matt

1 response

Hi Simple Matt,

You are right about what is wrong.

The IF function consists of 3 parts separated by "," and your formula has 3 "," which means 4 parts.

To work around this use the OR function in conjuction with the IF function like this:

=IF(OR(A1=B2,C1=B2,D1=B2,E1=B2,F1=B2,G1=B2,H1=B2,I1=B2,J1=B2,K1=B2,L1=B2,M1=B2)=TRUE,"error",B2)

Best regards,
Trowa
0