calculate the quotient of two different cells based on the criteria of two cells

Tacklebuster

New Member
Joined
Apr 8, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
for example, I am trying to find the quotient of two cells but the two cells being calculated might be different based on the criteria of another cell.


in cell I5 and want the quotient of H5/C5 but only if c5 is greater than 0, otherwise I want the quotient calculated between h5/d5. This is because if c5 is 0 then automatically d5 will be greater than 0

Your help is greatly appreciated.

Thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

If you won't have negative #s in C5

Excel Formula:
=H5/IF(C5,C5,D5)

If you might have negative #s in C5

Excel Formula:
=H5/IF(C5>0,C5,D5)
 
Upvote 0
Try:
Book1
ABCDHI
535103.333
Sheet1
Cell Formulas
RangeFormula
I5I5=H5/IF(C5>0,C5,D5)
That worked perfectly, thanks so much for your help, you saved me a lot of time. I Googled and searched youtube but none of the answers matched what I needed. Then I saw this forum and registered so I could post my question and the first response solved what I was trying to do. It was so simple and logical, thanks.

Walt
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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