ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rounding to the nearest 100 (https://www.excelbanter.com/excel-programming/385879-rounding-nearest-100-a.html)

Spike

rounding to the nearest 100
 
I will be very grateful for the code to round a number to the nearest 100

Many thanks
--
with kind regards

Spike

Spike

rounding to the nearest 100
 
I neglected to say i will be grateful for the code for both negative numbers
and positive numbers, i have used the floor or ceiling function to date on
positives but does not appear to work on negatives
--
with kind regards

Spike


"Spike" wrote:

I will be very grateful for the code to round a number to the nearest 100

Many thanks
--
with kind regards

Spike


Zack Barresse

rounding to the nearest 100
 
Hi Spike,

Why not just use the Round() function? If in VBA, you can access it from
Application.Worksheetfunctions.

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"



"Spike" wrote in message
...
I will be very grateful for the code to round a number to the nearest 100

Many thanks
--
with kind regards

Spike



Spike

rounding to the nearest 100
 
Thanks, i think i tried this initially, anyway using floor getting what is
required
--
with kind regards

Spike


"Zack Barresse" wrote:

Hi Spike,

Why not just use the Round() function? If in VBA, you can access it from
Application.Worksheetfunctions.

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"



"Spike" wrote in message
...
I will be very grateful for the code to round a number to the nearest 100

Many thanks
--
with kind regards

Spike




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

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