# Formula needed!!

#### Icehockey44

##### New Member
Hi All,

I am after a formula to bring back the following:

If cell A = route and Cell B is less than 240 bring back Under, if cell B is over 240 bring back Over, or, if Cell A = Static and Cell B is less than 240 bring back Under, if cell B is over 240 bring back Over.

I know for someone out ther ethis is a really simple task, but I can only get 1 part of it!!

Donna

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Like this?

=IF(OR(A1="route",A1="Static"),IF(B1<240,"Under","Over"),"")

Hi,

Try:
Code:
``=IF(OR(A1="Route",A1="Static"),If(B1<240,"Under",Over"),"A1 is not Route or Static")``

Thanks for this Andrew, it would of taken me ages to get to this conclusion. It has worked a treat.

many Thanks

Donna

I now need to amend this formula!!!

If cell A = route and Cell B is less than 240 bring back Under, if cell B is over 240 bring back Over, or, if Cell A = Static and Cell B is less than 60 bring back Under, if cell B is over 60 bring back Over.

I have highlighted the amended part of the formula in RED. I guess now that the numbers involved have changed, so will the formula?!?

Looking forward to your help on this one

Cheers

Donna

If cell A = route and Cell B is less than 240 bring back Under, if cell B is over 240 bring back Over, or, if Cell A = Static and Cell B is less than 60 bring back Under, if cell B is over 60 bring back Over.

Hello Donna, this should work:

=if(and(a="route",b<240),"Under",if(and(a="route",b>240),"Over",if(and(a="static",b<60),"Under",if(and(a="static",b>60),"Over",""))))

No doubt there are people clever enough to shorten the sequence I've used, but this will work, if slightly inefficiently.

MMIILP. thanks ever so much, this has also worked. it doesn't matter how long the formula is, just as long as it works I am more than happy.

Cheers for that

Donna

Replies
2
Views
302
Replies
1
Views
1K
Replies
11
Views
351
Replies
7
Views
252
Replies
5
Views
248

1,203,670
Messages
6,056,664
Members
444,881
Latest member
Stu2407

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