View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BoniM BoniM is offline
external usenet poster
 
Posts: 353
Default Round up entire worksheet

You can use the following code to add the ceiling function to range of values:

Sub RndUpRng()
Dim ColumnCount As Integer
Dim RowCount As Integer
For RowCount = 1 To Selection.Rows.Count
For ColumnCount = 1 To Selection.Columns.Count
ActiveCell = "=Ceiling(" & (ActiveCell) & ",1)"
If ColumnCount < Selection.Columns.Count Then
ActiveCell.Offset(0, 1).Activate
Else
ActiveCell.Offset(1, -Selection.Columns.Count + 1).Activate
End If
Next ColumnCount
Next RowCount
End Sub

Select only cells that contain values, not formulas, or the formulas will be
converted to their current value. If you don't know how to enter or use
code, see:
http://www.mvps.org/dmcritchie/excel....htm#havemacro
instructions by David McRitchie (Microsoft MVP)

"Christina" wrote:

The workbook is full of various sheets that are compiled from many
organizations...and go to the state. I cannot create additional sheets.

I did look in help-and it did not tell me how to round an entire worksheet
up, that's why I came here. I just want to type a number in, like 123.49 and
have it automatically jump up to 124.

I take it there is no way to do this? Using the currency option works,
except it rounds down if it's .49 or less :( I want all numbers to round up
to the next whole dollar.

Thank you.

"BoniM" wrote:

Quick and easy way to do it - create the sheet as you normally would, using
actual values. Format, etc, per usual. Then create a copy of the sheet in
the same workbook (Right click the sheet tab and choose Move or copy-make
sure to click the Create a Copy check box) and in the new sheet, replace the
values with a reference to the cells from the original sheet using the
ceiling function. Then you have everything the bosses want without double
the work.
If your sheets were named Actual and Rounded and cell B3 in the actual sheet
contained a value, then the formula in cell B3 in the Rounded sheet would be:
=Ceiling(Actual!B3,1) - once you have the first, you can use AutoFill to
copy to adjacent cells.
Good luck!

"Jaime" wrote:

Is there a way to make it so every number entered in a worksheet is
automatically rounded up? My work wants the numbers rounded up (12.01
rounded up to 13.00), however they want the actually amount to be typed in
for possible future audits.

I don't have to do this cell by cell do I?