asked on # Round to the nearest 10 in Excel or Open Office Calc

Is there a function, or does somebody have a formula or way of attacking these 3 problems, all **in MS Excel** (could **also** give an answer using **Open Office Calc**):

(1) (a)**How do you round to the nearest 10?** (b) **Better yet, express the answer more generally. So, the question, ideally, is, "How do you round to the nearest x, where x = a given, real number?"**

(2) (a) How do you round up to the nearest 10? (b) Same follow-up as in question (1).

(3) (a) How do you round down to the nearest 10? (b) Same follow-up as in question (1).

I have**Excel 2003**. I'd prefer an answer in Excel to one requiring Open Office Calc, but if there's a much easier way to do it in the latter, I'd be very interested in knowing that fact. It will probably be easiest to follow this thread if people specify which problem they're addressing, for example, "Problem (2b)".

Thanks.

(1) (a)

(2) (a) How do you round up to the nearest 10? (b) Same follow-up as in question (1).

(3) (a) How do you round down to the nearest 10? (b) Same follow-up as in question (1).

I have

Thanks.

SpreadsheetsMicrosoft ExcelLibreOffice

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

Whoops! Sorry. I forgot I had this question open. Let me try to review this stuff today. I hope I have time to get to it.

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

Hello Saqib,

I don't think that will work if number is a multiple of x, e.g. if number is 18 and x is 6 you'd expect a roundup function to return 18...but that would return 24.....

regards, barry

Thanks, Barry, I did not realize that.

Maybe we can modify it to

=INT(($F2+G$1*0.99999999)/G$1)*G$1

Maybe we can modify it to

=INT(($F2+G$1*0.99999999)/

Please, no more comments for now.

I'm raising the point value to reward experts for their patience.

I'll review answers and award points ASAP. I may have to post another post along these lines, before that time, to keep the question active. However, I do appreciate people's responses, and nobody will be cheated out of points they deserve. You just may have to wait a bit.

Sorry about this.

I'm raising the point value to reward experts for their patience.

I'll review answers and award points ASAP. I may have to post another post along these lines, before that time, to keep the question active. However, I do appreciate people's responses, and nobody will be cheated out of points they deserve. You just may have to wait a bit.

Sorry about this.

I bumped up the points to reward ongoing patience.

Thanks for waiting.

Thanks for waiting.

Again, I bumped up the points.

Thanks, all.

Thanks, all.

You said above:

>>Please, no more comments for now.

So, did you review the options presented? What is your result?

>>Please, no more comments for now.

So, did you review the options presented? What is your result?

Hi teylyn, I think the OP is not yet ready to review the options. "No more comments..." could be because EE stalls the asker's ability to ask more questions if the experts' comments are waiting long enough.

Saqib

Saqib

I will award points in the next 2 days. I'm currently printing all the threads I have going, even as I write this. I'll award 500 points total.

Thank you all for your patience and advice.

Thank you all for your patience and advice.

Hello, I just read the posts that you probably have an answer, but I think this is a readable solution:

=IF(RIGHT(A2, 1)+0>=5, CEILING(A2, 10), FLOOR(A2, 10))

=IF(RIGHT(A2, 1)+0>=5, CEILING(A2, 10), FLOOR(A2, 10))

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

=IF(MOD(A1/10,1)>=0.5,CEIL

10 --> 10

11 --> 10

12 --> 10

13 --> 10

14 --> 10

15 --> 20

16 --> 20

17 --> 20

18 --> 20

19 --> 20

20 --> 20

cheers, teylyn