![]() |
Rounding numbers to the nearest 5 or 0
Hi,
I know this is a rookie question, but for some reason, I cannot seem to wrap my mind around it. I'm attempting to round a number to the nearest 5 or 0. Here's an example. If A1 = 40 (no rounding) If A1 = 41 or 42 (round to 40) If A1 = 43, 44, 46 or 47 (round to 45) If A1 = 45 (no rounding) If A1 = 48 or 49 (round to 50) Perhaps, I've been staring at this too long! Thanks in advance to anyone who provides the "swift kick" to the head! Steve |
Hi!
=ROUND(A1/5,0)*5 Biff "Fieldmedic" wrote in message ... Hi, I know this is a rookie question, but for some reason, I cannot seem to wrap my mind around it. I'm attempting to round a number to the nearest 5 or 0. Here's an example. If A1 = 40 (no rounding) If A1 = 41 or 42 (round to 40) If A1 = 43, 44, 46 or 47 (round to 45) If A1 = 45 (no rounding) If A1 = 48 or 49 (round to 50) Perhaps, I've been staring at this too long! Thanks in advance to anyone who provides the "swift kick" to the head! Steve |
Try this:
=ROUND(A1/5,0)*5 -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Fieldmedic" wrote in message ... Hi, I know this is a rookie question, but for some reason, I cannot seem to wrap my mind around it. I'm attempting to round a number to the nearest 5 or 0. Here's an example. If A1 = 40 (no rounding) If A1 = 41 or 42 (round to 40) If A1 = 43, 44, 46 or 47 (round to 45) If A1 = 45 (no rounding) If A1 = 48 or 49 (round to 50) Perhaps, I've been staring at this too long! Thanks in advance to anyone who provides the "swift kick" to the head! Steve |
That did it, thanks! I knew it had to be something simple that I was missing!
:) "Ragdyer" wrote: Try this: =ROUND(A1/5,0)*5 -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Fieldmedic" wrote in message ... Hi, I know this is a rookie question, but for some reason, I cannot seem to wrap my mind around it. I'm attempting to round a number to the nearest 5 or 0. Here's an example. If A1 = 40 (no rounding) If A1 = 41 or 42 (round to 40) If A1 = 43, 44, 46 or 47 (round to 45) If A1 = 45 (no rounding) If A1 = 48 or 49 (round to 50) Perhaps, I've been staring at this too long! Thanks in advance to anyone who provides the "swift kick" to the head! Steve |
All times are GMT +1. The time now is 05:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com