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 calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,215,821
Messages
6,127,059
Members
449,356
Latest member
tstapleton67

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