Multiple references in IF statement

L

L Crites

I've posted this also in Technet, but have not received a
response. Can anyone help?

I'm trying to use an IF statement to perform a
calculation based on the value in a cell being equal to
any of three values. I have =IF(A2="28819",SUM(E2*-
1),"0") I want to be able to say that if A2="28819"
or "28827" or "27583", sum(E2*-1),"0") but it won't
allow me to do or. I've used In() in Access, but it
won't work in Excel either. Any ideas?
 
P

Peo Sjoblom

One way

=IF(OR(A2={28819;28827;27583}),E2*-1,0)

note that the sum function is redundant in this case
 

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

Top