count cells in a range

F

fullers

I am trying to write a function in excel. Part of the input is a range of
cells in a column. What do I need to write to allow me to count the number of
cells in that range?

Thanks in advance.
 
K

Ken Johnson

Hi fullers,
If the input range is selected and only in one column then:
Selection.rows.count
returns the number of cells in that range.
Is this what you are after?
Ken Johnson
 
A

Alan Beban

fullers said:
I am trying to write a function in excel. Part of the input is a range of
cells in a column. What do I need to write to allow me to count the number of
cells in that range?

Thanks in advance.
If the range (e.g., Range1) is a collection of cells rather than a
collection of rows or columns, then

Range1.Count

Alan Beban
 
Top