View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
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)