# 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 .

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Try

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

i should have thought of that before posting.

thanks anyways beers on the mansion!!!

just_jon said:
Try

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

Replies
2
Views
614
Replies
17
Views
366
Replies
1
Views
383
Replies
1
Views
370
Replies
0
Views
172

1,196,181
Messages
6,013,902
Members
441,791
Latest member
SKeulder

### 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.

### Which adblocker are you using?

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

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