Forum Discussion

RMF40's avatar
RMF40
Copper Contributor
Dec 05, 2024
Solved

How do I count the cells in a column where the column header starts with a character?

I have a table where the value in the top row for each column of data starts with either A, H or L. Something like, A_LIT, A__LANG, A_SCI.  What I want to do is to count all the cells in each column...
  • SergeiBaklan's avatar
    Dec 09, 2024

    As variant

    =SUMPRODUCT( ($A$2:$F$8="x") * (LEFT($A$1:$F$1) = "A") )

Resources