ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I round numbers to the nearest multiple of 10 or 5 in the same cell? (https://www.excelbanter.com/excel-worksheet-functions/266540-how-do-i-round-numbers-nearest-multiple-10-5-same-cell.html)

NOV705

How do I round numbers to the nearest multiple of 10 or 5 in the same cell?
 
I need a formula to round to the nearest 5 or 10 depending on what the number is. I need to round to the nearest 5 if the number is between 1 and 4 and to the nearest 10 if the number is between 6 and 9.

wickedchew

Quote:

Originally Posted by NOV705 (Post 960312)
I need a formula to round to the nearest 5 or 10 depending on what the number is. I need to round to the nearest 5 if the number is between 1 and 4 and to the nearest 10 if the number is between 6 and 9.

=IF(AND(A1=1,A1<=5),5,10)


All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com