Round function with floor

meghamadhulika

New Member
Joined
Feb 6, 2017
Messages
2
i calculating some late arrivals in my company.
A person if late for 4 times, its half day i.e.- penalty 0.5
A person if late for 6 times, its full day i.e. - penalty 1.0
so I have been using the FLOOR function for the same.
for e.g. A- Number of Late Arrivals
B- Number of days penalty
with the formula-FLOOR((IF(A1<=4,(A1/4*0.5),(A1/6))),0.5)

Now my problem is, I want answers in only multiples of 0.5 but in cell B1 the answer should be 2 instead of 3.
As after every 6 days, penalty is 1 day but if we are left with 3 days of Late arrival, it should be reduced to 0 than rounded to 1.

[TABLE="class: outer_border, width: 100"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]15[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]4[/TD]
[TD].5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]17[/TD]
[TD]2.5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]13[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

Please help me with this.

Regards,
meghamadhulika
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi, welcome to the forum!

Is it this maybe:


Excel 2013
AB
1152
240.5
3172.5
4132
Sheet1
Cell Formulas
RangeFormula
B1=INT(A1/6)+(INT(MOD(A1,6)/4)/2)
 
Upvote 0
Wow, This worked Like Magic.
Will you please explain me how it works???

Best Regards,
meghamadhulika


Hi, welcome to the forum!

Is it this maybe:

Excel 2013
AB

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]15[/TD]
[TD="bgcolor: #FFFF00, align: right"]2[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.5[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]2.5[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]2[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B1[/TH]
[TD="align: left"]=INT(A1/6)+(INT(MOD(A1,6)/4)/2)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Great, good to hear.

Will you please explain me how it works???

Try looking at the built in help for each of the functions being used and also stepping through the calculation steps using the "Evaluate Formula" option on the "Formulas" tab.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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