Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   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


Reply
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 01:37 PM.

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

About Us

"It's about Microsoft Excel"