WorksheetFunction.CountA method (Excel)

Counts the number of cells that are not empty and the values within the list of arguments.

Syntax

expression. CountA( _Arg1_ , _Arg2_ , _Arg3_ , _Arg4_ , _Arg5_ , _Arg6_ , _Arg7_ , _Arg8_ , _Arg9_ , _Arg10_ , _Arg11_ , _Arg12_ , _Arg13_ , _Arg14_ , _Arg15_ , _Arg16_ , _Arg17_ , _Arg18_ , _Arg19_ , _Arg20_ , _Arg21_ , _Arg22_ , _Arg23_ , _Arg24_ , _Arg25_ , _Arg26_ , _Arg27_ , _Arg28_ , _Arg29_ , _Arg30_ )

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 - Arg30 Required Variant 1 to 30 arguments representing the values you want to count.

Return value

Double

Remarks

Use CountA to count the number of cells that contain data in a range or array.

  • A value is any type of information, including error values and empty text (""). A value does not include empty cells.

  • If an argument is an array or reference, only values in that array or reference are used. Empty cells and text values in the array or reference are ignored.

  • If you do not need to count logical values, text, or error values, use the Count function.

See also

WorksheetFunction Object