Round to nearest specific number

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
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
 
Back
Top