Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

rounding question

Status
Not open for further replies.

ACtrafficengr

Civil/Environmental
Joined
Jan 5, 2002
Messages
1,641
Location
US
I'm looking for a way to round a value down to the next lower multiple of 5. For example, 39 is rounded to 35, not 40.

MROUND will round to the nearest multiple of 5. 39 will be rounded to 40.
ROUNDDOWN will round down to the nearest 10. 39 will be rounded to 30.

MROUND(n-2.5,5) seems to work. Any other ideas how to do this?

"...students of traffic are beginning to realize the false economy of mechanically controlled traffic, and hand work by trained officers will again prevail." - Wm. Phelps Eno, ca. 1928

"I'm searching for the questions, so my answers will make sense." - Stephen Brust

 
=FLOOR(X, 5)

Where "X" is the value you want rounded down.
 
Perfect!

Thank you!

"...students of traffic are beginning to realize the false economy of mechanically controlled traffic, and hand work by trained officers will again prevail." - Wm. Phelps Eno, ca. 1928

"I'm searching for the questions, so my answers will make sense." - Stephen Brust

 
Hi ACtrafficengr:

for using ROUNDDOWN, try ... =ROUNDDOWN(B2/A2,0)*A2

where B2=39, and A2=5

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top