CountA Method
Collapse the table of content
Expand the table of content

WorksheetFunction.CountA Method

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


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.


NameRequired/OptionalData TypeDescription
Arg1 - Arg30RequiredVariant1 to 30 arguments representing the values you want to count.

Return Value


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.

© 2015 Microsoft