charlotte said:
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)