Search code examples
google-sheets

google sheets - reference last column in range


I have and COUNTIF condition, where I count "Y". If I add more columns, I need to update range in formula of N2 last column (AX123...).

How to reference last column in this formula so if I add more columns, it range from C2 to {last_column}2 ?

Example: I will add one more column to end, formula should look like =COUNTIF(C2:M2, "Y")

sheet


Solution

  • you can directly just use C2:2 in place of C2:N2