IF AND or Whatever.

L

Legacy 23340

Guest
I am trying to do this.

=IF($G$7="U",E3/N11,IF($G$7="l",E3/N12))

I have no problem in setting up the formula, but my problem is that when the condition is met in each specific case( U or L), I want the "larger number to be divided by the smaller number" and no other way.

so eg. $E$3 = 435
$N$11 = 361
$N$12 = 1493

IF the condition is "U" then 435/361 = 1.2049(correct) but 361/435 = .8298 (incorrect)

IF the condition is "L" then 1493/435= 3.432 (correct) but 435/1493=.2913 (incorrect).

The values in all the cells change everytime I update the sheet and there is no knowing beforehand which value will be greater or lesser than the base value in $E$3.

And see guys (with your altruism) I am using absolute references now (y).
 

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.
i should have thought of that before posting.

thanks anyways beers on the mansion!!! :LOL:


just_jon said:
Try

=IF($G$7="U",MAX(E3,N11)/MIN(E3,N11),IF($G$7="l",MAX(E3,N12)/MIN(E3,N12),""))
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

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