次の方法で共有


WorksheetFunction.Ceiling_Precise Method (Excel)

Returns the specified number rounded to the nearest multiple of significance.

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality.

For more information about the new function, see the Ceiling_Precise method.

Version Information

Version Added: Excel 2010

Syntax

expression .Ceiling_Precise(Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name

Required/Optional

Data Type

Description

Arg1

Required

Double

Number - the value you want to round.

Arg2

Optional

Variant

Significance - the multiple to which you want to round.

Return Value

Double

Remarks

For example, if you want to avoid using pennies in your prices and your product is priced at $4.42, use the formula Ceiling(4.42,0.05) to round prices up to the nearest nickel.

Depending on the sign of the number and significance arguments, the Ceiling_Precise method rounds either away from or towards zero.

Sign (Arg1/Arg2)

Rounding

-/-

Rounds toward zero.

+/+

Rounds away from zero.

-/+

Rounds toward zero.

+/-

Rounds away from zero.

  • If either argument is nonnumeric, Ceiling_Precise generates an error.

  • If number is an exact multiple of significance, no rounding occurs.

See Also

Concepts

WorksheetFunction Object Members

WorksheetFunction Object