# Help

#### jmaw3

##### New Member
I need a formula for this:

=IF(AND(MU2265>=-1,MU2265>=1),\$B\$3/MO2265,IF(MU2265>1,\$B\$4/MO2265,IF(MU2256<-1,\$B\$4/MO2265,)))

if mu2265 is between -1 and 1 then do (X) but if it is more than 1 do (Y) and if it is less than -1 do (Z)

### Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Change the AND part of your formula to:
Code:
``AND(MU2265>=-1,[COLOR=#ff0000]MU2265<=1[/COLOR])``

Code:
``[FONT=Lucida Grande]=IF(AND[COLOR=#006107]([/COLOR][COLOR=#0057d6]MU2265[/COLOR]>=-1,[COLOR=#0057d6]MU2265[/COLOR][COLOR=#ff0000]<[/COLOR]=1[COLOR=#006107])[/COLOR],[COLOR=#006107]\$B\$3[/COLOR]/[COLOR=#ab30d6]MO2265[/COLOR],IF[COLOR=#006107]([/COLOR][COLOR=#0057d6]MU2265[/COLOR]>1,[COLOR=#a54a29]\$B\$4[/COLOR]/[COLOR=#ab30d6]MO2265[/COLOR],IF[COLOR=#ab30d6]([/COLOR][COLOR=#33af4a]MU2256[/COLOR]<-1,[COLOR=#a54a29]\$B\$4[/COLOR]/[COLOR=#ab30d6]MO2265[/COLOR],[COLOR=#ab30d6])[/COLOR][COLOR=#006107])[/COLOR])[/FONT]``

Hi

Alternatively :-
Code:
``````=IF(ABS(MU2265)>1,\$B\$4,\$B\$3)/MO2265

or

=OFFSET(\$B\$3,--(ABS(MU2265)>1),,)/MO2265``````

both of which are shorter than the original.

hth

Replies
12
Views
297
Replies
14
Views
265
Replies
8
Views
210
Replies
3
Views
249
Replies
0
Views
124

1,196,308
Messages
6,014,583
Members
441,828
Latest member
cofracr

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