If/And Statement with Multiple Cells

L

Legacy 48831

Guest
Hello Everyone. I am having a very difficult time with an If Statement. It has been a very long time since I have done this so I am a bit rusty.
The calculation consists of the following, Cell H12 has the calculation/function, Cell C12 needs to be greater than Zero, and cell M5 needs to also be greater than Zero. If this is true then the result in H12 should be J12 + M6. Also, if cell C12 is greater than Zero, and cell M5 is less than zero, then the result in H12 would be J12 - M6. Otherwise if cell C12 equals zero then cell H12 needs to result in zero.
Could someone please point me in the right direction?
 
Last edited by a moderator:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try this in H12:
Code:
=IF(AND(C12>0,M5>0),(J12+M6),IF(AND(C12>0,M5<0),(J12-M6),0))

Thank you philwojo. Your solution worked perfectly. I spent several hours and could not wrap my mind around the solution so I thought I would check with those on the forums with more knowledge than myself, glad I did!!
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top