Search code examples
google-sheetsgoogle-sheets-formula

Google Sheet: How to refer to a range using A1notation with a variable?


A2:A&COUNTIF(A2:A,"<>")

Instead of simply A2:A, I am trying to build a A1Notation that would only refer to column A that contains actual content. (There won't be empty rows in between non-empty rows) But this doesn't work. I need to use this A1notation as the first parameter of a Filter function.

How should I do it?


Solution

  • Use: INDIRECT("A2:A"&COUNTIF(A2:A,"<>"))