Trying to Round Down or Up depending on values after decimal

mixmstr

New Member
Joined
Apr 11, 2010
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi there, I have a spreadsheet I’m working on for employees worked hours. Depending on values after decimal, I want to either round down or up. Example: If value after decimal is (between .01-.24,round to 0),(between .25-.49,round to .25),(between .50-.74, rounds to .50),(between .75-.90, rounds to .75), and (between .90-.99, rounds up to 1 or next whole number).

So 5.24=5.00

5.40=5.25

5.60=5.50

5.90=5.75

5.91=6.00

Thank you for any help.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
This seems to work.

Ticket Split.xlsm
FG
15.015
25.025
35.035
45.045
55.055
65.065
75.075
85.085
95.095
105.15
115.115
125.125
135.135
145.145
155.155
165.165
175.175
185.185
195.195
205.25
215.215
225.225
235.235
245.245
255.255.25
265.265.25
275.275.25
285.285.25
295.295.25
305.35.25
315.315.25
325.325.25
335.335.25
345.345.25
355.355.25
365.365.25
375.375.25
385.385.25
395.395.25
405.45.25
415.415.25
425.425.25
435.435.25
445.445.25
455.455.25
465.465.25
475.475.25
485.485.25
495.495.25
505.55.5
515.515.5
525.525.5
535.535.5
545.545.5
555.555.5
565.565.5
575.575.5
585.585.5
595.595.5
605.65.5
615.615.5
625.625.5
635.635.5
645.645.5
655.655.5
665.665.5
675.675.5
685.685.5
695.695.5
705.75.5
715.715.5
725.725.5
735.735.5
745.745.5
755.755.75
765.765.75
775.775.75
785.785.75
795.795.75
805.85.75
815.815.75
825.825.75
835.835.75
845.845.75
855.855.75
865.865.75
875.875.75
885.885.75
895.895.75
905.95.75
915.916
925.926
935.936
945.946
955.956
965.966
975.976
985.986
995.996
10066
Sheet1
Cell Formulas
RangeFormula
F1:F100F1=5+SEQUENCE(100)/100
G1:G100G1=LET(i,INT(F1#),f,F1#-i,n,INT(f/0.25)*0.25,(i+n)+((f>0.9)*0.25))
Dynamic array formulas.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option
Excel Formula:
=FLOOR.MATH(A2,0.25)+IF(MOD(A2,1)>0.9,0.25,0)
 
Upvote 0
This seems to work.

Ticket Split.xlsm
FG
15.015
25.025
35.035
45.045
55.055
65.065
75.075
85.085
95.095
105.15
115.115
125.125
135.135
145.145
155.155
165.165
175.175
185.185
195.195
205.25
215.215
225.225
235.235
245.245
255.255.25
265.265.25
275.275.25
285.285.25
295.295.25
305.35.25
315.315.25
325.325.25
335.335.25
345.345.25
355.355.25
365.365.25
375.375.25
385.385.25
395.395.25
405.45.25
415.415.25
425.425.25
435.435.25
445.445.25
455.455.25
465.465.25
475.475.25
485.485.25
495.495.25
505.55.5
515.515.5
525.525.5
535.535.5
545.545.5
555.555.5
565.565.5
575.575.5
585.585.5
595.595.5
605.65.5
615.615.5
625.625.5
635.635.5
645.645.5
655.655.5
665.665.5
675.675.5
685.685.5
695.695.5
705.75.5
715.715.5
725.725.5
735.735.5
745.745.5
755.755.75
765.765.75
775.775.75
785.785.75
795.795.75
805.85.75
815.815.75
825.825.75
835.835.75
845.845.75
855.855.75
865.865.75
875.875.75
885.885.75
895.895.75
905.95.75
915.916
925.926
935.936
945.946
955.956
965.966
975.976
985.986
995.996
10066
Sheet1
Cell Formulas
RangeFormula
F1:F100F1=5+SEQUENCE(100)/100
G1:G100G1=LET(i,INT(F1#),f,F1#-i,n,INT(f/0.25)*0.25,(i+n)+((f>0.9)*0.25))
Dynamic array formulas.
Thank you for the reply. I will give it a shot when I get home
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option
Excel Formula:
=FLOOR.MATH(A2,0.25)+IF(MOD(A2,1)>0.9,0.25,0)
Thank you for the reply. I just updated account details to show office 365. I will give your option a try.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option
Excel Formula:
=FLOOR.MATH(A2,0.25)+IF(MOD(A2,1)>0.9,0.25,0)
This worked!! Thank you for this. Much appreciated.
 
Upvote 0
This seems to work.

Ticket Split.xlsm
FG
15.015
25.025
35.035
45.045
55.055
65.065
75.075
85.085
95.095
105.15
115.115
125.125
135.135
145.145
155.155
165.165
175.175
185.185
195.195
205.25
215.215
225.225
235.235
245.245
255.255.25
265.265.25
275.275.25
285.285.25
295.295.25
305.35.25
315.315.25
325.325.25
335.335.25
345.345.25
355.355.25
365.365.25
375.375.25
385.385.25
395.395.25
405.45.25
415.415.25
425.425.25
435.435.25
445.445.25
455.455.25
465.465.25
475.475.25
485.485.25
495.495.25
505.55.5
515.515.5
525.525.5
535.535.5
545.545.5
555.555.5
565.565.5
575.575.5
585.585.5
595.595.5
605.65.5
615.615.5
625.625.5
635.635.5
645.645.5
655.655.5
665.665.5
675.675.5
685.685.5
695.695.5
705.75.5
715.715.5
725.725.5
735.735.5
745.745.5
755.755.75
765.765.75
775.775.75
785.785.75
795.795.75
805.85.75
815.815.75
825.825.75
835.835.75
845.845.75
855.855.75
865.865.75
875.875.75
885.885.75
895.895.75
905.95.75
915.916
925.926
935.936
945.946
955.956
965.966
975.976
985.986
995.996
10066
Sheet1
Cell Formulas
RangeFormula
F1:F100F1=5+SEQUENCE(100)/100
G1:G100G1=LET(i,INT(F1#),f,F1#-i,n,INT(f/0.25)*0.25,(i+n)+((f>0.9)*0.25))
Dynamic array formulas.
I couldn't get this to work as I wasn't sure what i & n values should be.
 
Upvote 0

Forum statistics

Threads
1,226,112
Messages
6,189,039
Members
453,520
Latest member
packrat68

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