ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rounding numbers with CEILING function (https://www.excelbanter.com/excel-programming/356814-rounding-numbers-ceiling-function.html)

matpj[_49_]

Rounding numbers with CEILING function
 

Hi all,

I have 3 colulmns of data column O,P,Q in my worksheet.
I need my macro to reound all of these figures up to the nearest whol
number e.g. CEILING(O2,1)

Is it possible to do this in the same column - i.e. without inserting
column and applying a formula to get the ceiling, and the
copying/pasting values before removing the oringal column?

I just want to be able to perform the calculation on the three column
of data using the range governed by the last row.

I have set a variable to the last row, so the range of data i
"O2:Q<lastrow"


any ideas?

thank in advance,
mat

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=52534


Toppers

Rounding numbers with CEILING function
 


For Each cell In Range("O2:Q" & lastrow)
cell.Value = Application.Ceiling(cell, 1)
Next

"matpj" wrote:


Hi all,

I have 3 colulmns of data column O,P,Q in my worksheet.
I need my macro to reound all of these figures up to the nearest whole
number e.g. CEILING(O2,1)

Is it possible to do this in the same column - i.e. without inserting a
column and applying a formula to get the ceiling, and then
copying/pasting values before removing the oringal column?

I just want to be able to perform the calculation on the three columns
of data using the range governed by the last row.

I have set a variable to the last row, so the range of data is
"O2:Q<lastrow"


any ideas?

thank in advance,
matt


--
matpj
------------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=525344




All times are GMT +1. The time now is 07:41 PM.

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