Search code examples
excelexcel-formulaformulacountifexcel-tables

COUNTIF using Table terminology


I have a table called Table1, and I want to use Table terminology (for example: instead of B$2 write something that include the name of the column ("String"))

Would love to use your help. Thanks.

enter image description here

Edit: It's not a solution to my question but I found an alternative solution using INDIRECT ADDRESS

This is a generic formula to COUNTIF to previous column: =COUNTIF(INDIRECT(ADDRESS(2,COLUMN()-1,4)):INDIRECT(ADDRESS(ROW(),COLUMN()-1,4)),INDIRECT(ADDRESS(ROW(),COLUMN()-1,4)))

enter image description here


Solution

  • Corrected

    Don't try

    =COUNTIF([String],[@String])

    Instead try

    =SUM(([String]=[@String])*(ROW([String])<=ROW([@String])))