Rounding at a variable value

David284

New Member
Joined
May 4, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I have designed a calculator to work out the number of people required to do certain tasks based on a fixed rate.

When I run the calculator it gives a value to 1 decimal place

It is acceptable to ask someone to do more than the work of 1.2 people.

How do I round at a value other than 0.5 but dependent upon what the whole number is.

I.e.

1.2 and less becomes 1, 1.3 and above becomes 2;

2.4 and less becomes 2, 2.5 and above becomes 3;

3.6 and less becomes 3 but 3.7 and above becomes 4;

4.8 and less becomes 4, 4.9 becomes 5

Obviously there after I want it just to round down

sorry for the complex explanation
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I'm afraid this looks a bit awkward, but it works. The second formula is there so that you don't need to have the lookup table in your worksheet.

MrExcel posts18.xlsx
ABCDEF
201valuepersonspersons (hard-coded table)
31.2120.811
42.4131.111
53.6141.211
64.811.322
7222
82.322
92.422
102.533
113.533
123.633
133.744
144.744
154.844
164.944
175.155
187.377
1915.51515
Sheet20
Cell Formulas
RangeFormula
E3:E19E3=IF(D3>$A$6,ROUNDDOWN(D3,0),MROUND(D3,VLOOKUP(D3,$A$2:$B$6,2)))
F3:F19F3=IF(D3>4.81,ROUNDDOWN(D3,0),MROUND(D3,VLOOKUP(D3,{0,1;1.21,2;2.41,3;3.61,4;4.81,0},2)))
 
Upvote 0
Steve, your otherwise excellent formula needs to consider numbers equal to or greater than 4.8, like this for my sample data:

=IF(D3>=4.8,ROUNDDOWN(D3,0),ROUNDUP(D3-INT(D3)*0.2,0))
 
Upvote 0
Im not sure it does reading the OP. If someone can do 1.2 and theres 6 that needs to be done then it produces 5 which is right isnt it?
 
Upvote 0

Forum statistics

Threads
1,213,483
Messages
6,113,919
Members
448,533
Latest member
thietbibeboiwasaco

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