Rounding up or down in the same formula

J

Jack L. Hyman

How do I create a single formula to either round up or down the result of my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack
 
S

Sandy Mann

Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
P

Peo Sjoblom

Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

Doh!



--


Regards,


Peo Sjoblom


Sandy Mann said:
Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
J

Jack L. Hyman

Thank you!

Peo Sjoblom said:
Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom
 
J

Jack L. Hyman

Thank you very much!

Sandy Mann said:
Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
P

Peo Sjoblom

You might want to use Sandy's formula that will do the same with less effort


--


Regards,


Peo Sjoblom
 
J

Jack L. Hyman

Thank you...both do the job well.

Peo Sjoblom said:
You might want to use Sandy's formula that will do the same with less effort


--


Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top