VBA CSng Function: The CSng function in VBA converts the supplied expression into a single-precision floating-point number (single data type).

Syntax

Parameter

Expression (required) – This parameter represents the expression that you want to convert to a single data type.

Return

This function returns a single-precision floating-point number after converting the supplied expression into a single data type.

Example 1

Output

0.999989986

VBA CSng Function

Example 2

Output

4.040100098

VBA CSng Function

Example 3

Output

VBA CSng Function

Pin It on Pinterest

Share This