# If Formula help Please...

#### vingo

##### New Member
How do I write this formula in B6???

If B5<5, then B6=80
If B5 is between 5 and 9, then B6 is 120
If B5 is 10 or more, then B6 is 160.

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### macb

##### Board Regular
Hi there:

Try this

IF(B5<5,80,IF(AND(B5>=5,B5<=9),120,160))

Regards

Mac

#### clipro

##### Board Regular
=IF(B5>=10;160;IF(B5>=5;120;80))

you said formula not VBA

I hope that it is OK

#### Scott Huish

##### MrExcel MVP
Try this:

=VLOOKUP(B5,{-9.99999999999999E+307,80;5,120;10,160},2,1)

Great!! Thanks!!

Replies
12
Views
540
Replies
0
Views
97
Replies
5
Views
204
Replies
0
Views
522
Replies
3
Views
447

1,181,814
Messages
5,932,204
Members
436,823
Latest member
kailose

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

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