Home > Blockchain >  Use "COLUMN" function on imported range Google Sheets
Use "COLUMN" function on imported range Google Sheets

Time:03-19

I am trying to find the location of the last non-empty cell in a row in a Google Sheet, and I've found several methods, but have been struggling to get any to work on imported data. I need to perform this function on a row in a different tab.

Can I use some variation of this method:

=MAX(ARRAYFORMULA(COLUMN(A2:2)*(--(A2:2<>""))))

on a range in a different tab? When I try using importrange in lieu of the ranges provided above, I get the error "Argument must be a range".

Here's what I'm trying

=MAX(ARRAYFORMULA(COLUMN(IMPORTRANGE("URL","tab!A2:2"))*(--( IMPORTRANGE("URL","tab!A2:2")<>""))))

Do I have a syntax error? Or can I not use a function like "COLUMN" on an imported range? Any ideas of a better way to do this in general?

CodePudding user response:

Try

=counta(importrange("URL","tab!A2:2"))

CodePudding user response:

try:

=MAX(INDEX(IF(IMPORTRANGE("URL", "tab!A2:2")="",, SEQUENCE(1, 10000)))
  • Related