Thread: If statement Thanks:  1 Post #5279577 (1) Likes: 0

1. If statement

Hey guys I am stuck with a simple problem.

Basically I am doing sum of Q11:Q31

I need it to sum and show the result but with few IF conditions

cell C3 needs to have some data in it
cell Q2 needs to have some data in it
O33 needs to be equal to P33, V33 and W33

If it does not meet conditions then it would show ERROR
I have this formulae which works perfectly if P33=O33.
However I am not able to do P33=O33=V33=W33

Code:
=IF(AND(C3<>"",Q2<>"",P33=O33),SUM(Q11:Q31),"ERROR")  Reply With Quote

2. Re: help with If statement

Hi,

What does this mean:

"O33 needs to be equal to P33, V33 and W33"

Is it that O33 must equal the sum of P33 + V33 + W33? Or O33 = P33 and O33 = V33 and O33 = W33?

Matty  Reply With Quote

3. Re: help with If statement

hey Matty,
the value in O33 needs to be equal to the value in P33, V33,W33

So if O33=1
P33=1
V33=1
W33=1

then i want it to sum
However if the values does not match of all the 4 cell den it would show error

Basically all the 4 cells must have the same value  Reply With Quote

4. Re: help with If statement

Hi,

If O33, P33, V33 and W33 are all numeric, try:

Code:
=IF(AND(C3<>"",Q2<>"",STDEV(O33,P33,V33,W33)=0),SUM(Q11:Q31),"ERROR")
Else:

Code:
=IF(AND(C3<>"",Q2<>"",O33=P33,O33=V33,O33=W33),SUM(Q11:Q31),"ERROR")
Matty  Reply With Quote

5. Re: help with If statement

Hey Matty,

the above code works perfectly.
Thank you so much for your help.
Thank you  Reply With Quote

User Tag List

Tags for this Thread

cell, conditions, data, show, sum  Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•