Forum Discussion

Niklas Kalz's avatar
Niklas Kalz
Copper Contributor
Apr 12, 2017
Solved

Finding Excel Formel Matrix

Hello everybody,   I try to create an Excel- Formel with which I can count the amount of numerics in a column, but without the commas , and a number like 10 should only be counted once, so for e...
  • SergeiBaklan's avatar
    SergeiBaklan
    Apr 12, 2017

    Niklas, assuming all your strings with numbers are in column A and you have nothing more in that column, you may use

    =SUMPRODUCT(LEN(A:A)) -
      SUMPRODUCT(LEN(SUBSTITUTE(A:A,CHAR(44),""))) +
      COUNTA(A:A)

    For your example with strings in A1:A3 it returns 12.

     

    SUMPRODUCT sums lengths of cells which it considers as array. At the end we shall add 1 for each cell with text, do that by COUNTA which calculates number of non empty cells.

     

    Sure, you may use concrete range instead of A:A, e.g A1:A20