#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Round up

How do I get a number in a cell rounded up without having to perform the
ROUNDUP function in another cell.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Round up

Use a macro

This routine, for example, will roundup user selected cells to the next
higher integer value:

Sub roundupp()
Dim r As Range
For Each r In Selection
With r
v = Int(.Value) + 1
.Value = v
End With
Next
End Sub


--
Gary''s Student - gsnu200834


"Mike B" wrote:

How do I get a number in a cell rounded up without having to perform the
ROUNDUP function in another cell.

Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Round up

On Feb 18, 5:19*am, Mike B wrote:
How do I get a number in a cell rounded up without
having to perform the ROUNDUP function in another cell.


Your question is unclear. Do you mean, for example, that if you have
the value 12.4 in A1 and B1 has the formula =A1+A2, you would like B1
to use the value 13 for A1?

That is what "without having to perform the ROUNDUP function in
__another__ cell" means to me.

Other than ensuring that A1 itself is rounded up, I don't believe that
is possible.

Moreover, I hasten to point out that no matter how we might interpret
your inquiry, you neglect to say to what level of precision things
should be rounded up automatically. So I think it is safe to say that
there is no way to do what you ask, in general.

You could set the Precision As Displayed option under Tools Options
Calculation. Then, by formatting A1 as Number with 0 dp, the value

of A1, not just the displayed number, will be rounded (but not
necessarily rounded __up__); so all references to A1 will use the
rounded value.

But besides the fact that that rounds, not rounds up as you requested,
Precision As Displayed might have unexpected results if you are not
careful. It has a pervasive effect on the entire workbook.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Round up

PS....

On Feb 18, 7:08*am, I wrote:
You could set the Precision As Displayed option under
Tools Options Calculation.
[....]
But besides the fact that that rounds, not rounds up
as you requested, Precision As Displayed might have
unexpected results if you are not careful.


I might also point out that Precision As Displayed means "Precision of
the Result as It Is Displayed (Formatted)". It does not mean that the
operands are converted to the precision of the cell in which the
calculation is performed or even that the calculation (i.e., each
subexpression) is performed with that precision.

For example, if A1 displays 12.5, and A2 displays 2.5, and B1 has the
formula =A1*A2 formatted as Number with 0 dp, the result in B1 is 31,
not 39.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Round up



"joeu2004" wrote:

On Feb 18, 5:19 am, Mike B wrote:
How do I get a number in a cell rounded up without
having to perform the ROUNDUP function in another cell.


Your question is unclear. Do you mean, for example, that if you have
the value 12.4 in A1 and B1 has the formula =A1+A2, you would like B1
to use the value 13 for A1?

That is what "without having to perform the ROUNDUP function in
__another__ cell" means to me.

Other than ensuring that A1 itself is rounded up, I don't believe that
is possible.

Moreover, I hasten to point out that no matter how we might interpret
your inquiry, you neglect to say to what level of precision things
should be rounded up automatically. So I think it is safe to say that
there is no way to do what you ask, in general.

You could set the Precision As Displayed option under Tools Options
Calculation. Then, by formatting A1 as Number with 0 dp, the value

of A1, not just the displayed number, will be rounded (but not
necessarily rounded __up__); so all references to A1 will use the
rounded value.

But besides the fact that that rounds, not rounds up as you requested,
Precision As Displayed might have unexpected results if you are not
careful. It has a pervasive effect on the entire workbook.


Thanks for your help, appolgies for not being more specifi, however your
reply has answered another problem I encountered

Mike
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
round up firroo Excel Discussion (Misc queries) 2 December 18th 08 02:09 PM
round down? Toppers Excel Discussion (Misc queries) 0 February 15th 07 04:27 PM
round down? Dave F Excel Discussion (Misc queries) 0 February 15th 07 04:26 PM
Round up to 100? Fred Holmes Excel Worksheet Functions 1 February 21st 05 02:40 PM
How do I ROUND() round off decimals of a column dataset? Højrup Excel Worksheet Functions 2 January 12th 05 10:50 AM


All times are GMT +1. The time now is 11:23 AM.

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"