View Single Post
  #3  
Old March 29th, 2010, 05:53 PM posted to microsoft.public.excel.newusers
Joe User[_2_]
external usenet poster
 
Posts: 757
Default sum of cells containing text

"charlotte" wrote:
I have a selection of cells and i need the sum
if they contain text


Do you mean count, not sum? Do you mean count all cells even if they
contain text; or do you mean count the cells that contain text, excluding
those that are numeric?

To count all non-empty cells:

=counta(A1:A100)

To count cells that contain text, exlcuding those that are numeric:

=sumproduct(--istext(A1:A100))

To sum cells, regardless of whether they are numeric or they contain numeric
strings as text:

=sumproduct(--A1:A100)