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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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