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

Time:11-19

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?

CodePudding user response:

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

CodePudding user response:

If you're simply looking for all nonempty cells in A2:A, I'm not sure why you can't just use:

=filter(A2:A,A2:A<>"")
  • Related