greater than less than or round up

Slow Learner

New Member
Joined
Dec 21, 2021
Messages
6
Office Version
  1. 2010
Hi All,

I am trying to construct a formula for the following
If B4 is between 1-200 it returns 200 if between 201-230 it returns 230 and if over 230 it rounds to the nearest 5
Any help with this would be greatly appreciated.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(AND(B4>=1,B4<=200),200,IF(B4<=230,230,MROUND(B4,5)))
 
Upvote 0
How about
Excel Formula:
=IF(B4="",0,IF(AND(B4>=1,B4<=200),200,IF(B4<=230,230,MROUND(B4,5))))
 
Upvote 0
Solution
How about
Excel Formula:
=IF(B4="",0,IF(AND(B4>=1,B4<=200),200,IF(B4<=230,230,MROUND(B4,5))))
I wish I had come here sooner!!
One last thing so apologies I need it to round up to the nearest 5 not round to the nearest 5 like I previously stated. Sorry to be a pain.
 
Upvote 0
For that, just change mround to ceiling.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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