Round to nearest specific number

G

Guest

I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 
G

Guest

This is the function I am currently using but doe not render desired result.
This function allows you to specify the number of decimal places

BUT

I need to specify the number I want to round to NOT the number of decimal
places.

For example round off to the nearest 5c

Hope this clears things up.

Dennis said:
Use the Round function

Round([Number],Decimal Places)

Patrick said:
I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 
G

Guest

dp = decimal places (set to 2 for nearest 5c ?)

Int([Number] * 10^dp + .5) / 10^dp

Patrick said:
This is the function I am currently using but doe not render desired result.
This function allows you to specify the number of decimal places

BUT

I need to specify the number I want to round to NOT the number of decimal
places.

For example round off to the nearest 5c

Hope this clears things up.

Dennis said:
Use the Round function

Round([Number],Decimal Places)

Patrick said:
I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 
G

Guest

Thanks for that.

I have tried this and it seems to just add .05 to the end of [Number]. Am I
doing something or just being silly.

Sorry to be such a bother.

Dennis said:
dp = decimal places (set to 2 for nearest 5c ?)

Int([Number] * 10^dp + .5) / 10^dp

Patrick said:
This is the function I am currently using but doe not render desired result.
This function allows you to specify the number of decimal places

BUT

I need to specify the number I want to round to NOT the number of decimal
places.

For example round off to the nearest 5c

Hope this clears things up.

Dennis said:
Use the Round function

Round([Number],Decimal Places)

:

I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 
G

Guest

Have you got the brackets for the Int in the correct place ?
if your number = 23.467 and you want to round to the nearest 2 dp
then the formula is Int(23.467 * 100 + .5) / 100
the first part in the brackets will give 2347.2
the Int will then give 2347
the / 100 will then give 23.47
Is this what you are looking for or are you looking for 23.45 or 23.50 ?

Patrick said:
Thanks for that.

I have tried this and it seems to just add .05 to the end of [Number]. Am I
doing something or just being silly.

Sorry to be such a bother.

Dennis said:
dp = decimal places (set to 2 for nearest 5c ?)

Int([Number] * 10^dp + .5) / 10^dp

Patrick said:
This is the function I am currently using but doe not render desired result.
This function allows you to specify the number of decimal places

BUT

I need to specify the number I want to round to NOT the number of decimal
places.

For example round off to the nearest 5c

Hope this clears things up.

:

Use the Round function

Round([Number],Decimal Places)

:

I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 
G

Guest

Thanks very much Dennis,

I am however looking for the answer to be 23.45 or 23.50. Are you able to
assist with this result?

Dennis said:
Have you got the brackets for the Int in the correct place ?
if your number = 23.467 and you want to round to the nearest 2 dp
then the formula is Int(23.467 * 100 + .5) / 100
the first part in the brackets will give 2347.2
the Int will then give 2347
the / 100 will then give 23.47
Is this what you are looking for or are you looking for 23.45 or 23.50 ?

Patrick said:
Thanks for that.

I have tried this and it seems to just add .05 to the end of [Number]. Am I
doing something or just being silly.

Sorry to be such a bother.

Dennis said:
dp = decimal places (set to 2 for nearest 5c ?)

Int([Number] * 10^dp + .5) / 10^dp

:

This is the function I am currently using but doe not render desired result.
This function allows you to specify the number of decimal places

BUT

I need to specify the number I want to round to NOT the number of decimal
places.

For example round off to the nearest 5c

Hope this clears things up.

:

Use the Round function

Round([Number],Decimal Places)

:

I am looking for a function or something to help me round to the nearest X.

I have used MROUND as a function in excel and am hoping there is something
similar I can use.

Eg round R10,06 to R10,05 (round to the rearest 5c)

Many Thanks
 

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

Similar Threads

Round to nearest quarter 5
Rounding Numbers 1
Round to nearest 10,000 2
Round Function 3
Round Down to the nearest multiple 2
Round time up to nearest :15 2
Round Function 5
Round formula 1

Top