1. if,and added to nested ifs

Condition 1 If B = "clinic", then D = C*8
Condition 2 If B = "clinic", and E = 1, then D = (C*8)+4
Condition 3 If B = "work", then D = C*20
Condition 4 If B = "showup", then D =20

I got for conditions 1,3,4:
=IF(B30="clinic",C30*8,IF(B30="work",C30*20,IF(B30 ="showup",20)))
I got for condition 2:
=IF(AND(B28="clinic",E28=1),(C28*8)+4,C28*8)

How do I incorporate both/all together?

2. Skipro,

This should do it if I got the parens counted right.

=if(B30="work",B30=C30*2,If(B30="showup",20,If(B30 ="clinic",If(E30=1,D30=C30*8+4,C30*8),"Error")) )

3. Alternatively:
=IF(B30="work",C30*2,IF(B30="showup",20,IF(B30 ="clinic",C30*8+(E30=1)*4,"Error")))

4. Originally Posted by RetiredGeek
Skipro,

This should do it if I got the parens counted right.

=if(B30="work",B30=C30*2,If(B30="showup",20,If(B30 ="clinic",If(E30=1,D30=C30*8+4,C30*8),"Error")) )
Hi retiregeek,

That won't work. At the minimum, you need to reduce the formula to:
=if(B30="work",C30*2,If(B30="showup",20,If(B30="cl inic",If(E30=1,D30=C30*8+4,C30*8),"Error")))

5. Paul,

Thanks, obviously you think clearer than I in the late/early hours.

6. Thank you RG and MP.

Posting Permissions

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