LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use function ceiling?? keys2000 Excel Discussion (Misc queries) 4 June 7th 09 05:20 PM
If Function and rounding numbers DM Excel Discussion (Misc queries) 3 March 5th 09 08:46 AM
how to use the ceiling function Larry Excel Worksheet Functions 2 April 11th 07 07:34 PM
rounding numbers for match function erc_blair Excel Worksheet Functions 2 February 14th 06 03:12 PM
rounding numbers for match function erc_blair Excel Worksheet Functions 1 February 14th 06 01:21 AM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"