Round-up

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
NullZero's function will fail for decimals that add up to less than 0.5

ie 4.1 will yield 4 not 5.

Try using this function from MS:

Place the following in a module.

Code:
Function Ceiling(N, ByVal Precision)
'
' Similar to Excel's Ceiling function
' Rounds up to the next higher level of precision.
' Precision cannot be 0.
'
Dim Temp As Double
  Precision = Abs(Precision)
  Temp = Int(N / Precision) * Precision
  If Temp = N Then
    Ceiling = N
  Else
    Ceiling = Temp + Precision * Sgn(Temp)
  End If
End Function

An example of how to use in a query,
RoundNumber: Ceiling([Field1],1)

*Note: This function is accurate up to 14 decimal places ie 4.000000000000001 will yield 5, anything past will yield 4*

HTH,
CT
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,874
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top