Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to use function ceiling?? | Excel Discussion (Misc queries) | |||
If Function and rounding numbers | Excel Discussion (Misc queries) | |||
how to use the ceiling function | Excel Worksheet Functions | |||
rounding numbers for match function | Excel Worksheet Functions | |||
rounding numbers for match function | Excel Worksheet Functions |