i need help doing rounding
in A2 i have 4.4 i need it to be rounded to the nearest 0.5
in A4 i have 4.3 i need it to be rounded down to 4
in A7 i could have 4.8 which needs to go to 5
all the cells in column A will vary fron months to months
i have tried mround
roundup and rounddown doesn't work
are you looking for one formula to do these three different roundings?
What should happen with 4.6? Round down to 4.5?
if so, try this:
=IF(AND(MOD(A2,1)>=0.4,MOD(A2,1)<=0.6),MROUND(A2,0.5),ROUND(A2,0))
Last edited by teylyn; 01-17-2010 at 04:02 PM.
duckie
Round with 0.5 was no good
=ROUND(A1,0.5)
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
or
you'd think donkeyote thought of this one
=IF(EXACT(MOD(G21,1),0.5),G21,ROUND(G21,0.5))
Last edited by pike; 01-17-2010 at 04:36 PM.
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
pike, ROUND(a2,0.5) does not round to 4.5 on my machine. What are you getting?
Round expects an integer value for the second argument. If you use a non-integer value as that argument then I believe Excel just truncates it so if you use
=ROUND(A1,0.5)
or
=ROUND(A1,0.99)
you'll get the same results as
=ROUND(A1,0)
i.e. it'll round to the nearest integer
didn't know that just trial and error
=IF(MOD(G21,1)=0.5),G21,ROUND(G21,0))
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks