rv_ui
(Ravi)
December 13, 2022, 4:30pm
1
Hello,
I need help rounding up values to nearest quarter in excel. For example if I have values between 0.01 to 0.24 I need to round them up to 0.25 and so on… I tried the round up method and all it is rounding up to is the nearest decimal value. Could someone please help me with this?
Thanks
Anil_G
(Anil Gorthi)
December 13, 2022, 4:42pm
2
@rv_ui
Welcome to the community
Try this formula in your excel
=ROUND(A1*4,0)/4
A1 is where you will have the original value
Cheers
rv_ui
(Ravi)
December 13, 2022, 4:55pm
3
Anil_G:
the original value
Is there any way I can do that in Studio? like write a program or an expression
Thank you for your response
rv_ui
(Ravi)
December 13, 2022, 5:01pm
4
I tried that and it is not rounding up to the way I wanted. So if I do
=ROUND(0.01*4,0)/4
0.01 is the value in the excel, I am getting 0.00 as the output, but the business need them to be rounded up to the nearest quarter which is 0.25
Anil_G
(Anil Gorthi)
December 13, 2022, 5:07pm
5
@rv_ui
You can try in excel
=CEILING(A1,0.25)
In Studio not sure…let me try if we can…
You can use write formula and fill range activities to write formula to excel and fill it
cheers
Anil_G
(Anil Gorthi)
December 13, 2022, 5:11pm
6
@rv_ui
So in studio as well you can try this
‘Math.Ceiling(var*4)/4’
var is the place where you value is stored…if its a string use cdbl(var)
to convert to double
Hope this solves
cheers
system
(system)
Closed
December 16, 2022, 5:18pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.