You can use the following formula to retrieve the value of the last cell in a spreadsheet using Importrange:
=INDEX(IMPORTRANGE("spreadsheetURL", "sheetname!A1:Z"), MAX(FILTER(ROW(IMPORTRANGE("spreadsheetURL", "sheetname!A:Z")), IMPORTRANGE("spreadsheetURL", "sheetname!"&ROW(IMPORTRANGE("spreadsheetURL", "sheetname!A:Z"))&":Z")<>"")) ,MAX(FILTER(COLUMN(IMPORTRANGE("spreadsheetURL", "sheetname!A:Z")), IMPORTRANGE("spreadsheetURL", "sheetname!"&ROW(IMPORTRANGE("spreadsheetURL", "sheetname!A:Z"))&":"&COLUMN(IMPORTRANGE("spreadsheetURL", "sheetname!Z")))<>"")))
Replace "spreadsheetURL" with the URL of the spreadsheet, and "sheetname" with the name of the sheet you want to retrieve the data from.
This formula uses the INDEX function to look up the value in the last cell that contains data. It first imports the data from the specified sheet using IMPORTRANGE, then uses the MAX and FILTER functions to determine the row and column of the last cell with data. Finally, the INDEX function is used to retrieve the value at the specified row and column.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-01-07 11:00:00 +0000
Seen: 1 times
Last updated: Feb 19 '22
How can I deal with Expression.Error related to a column in Power Query?
How can you implement pagination in Oracle for the LISTAGG() function?
What is the process for implementing a FutureBuilder on an OnTap function in Flutter?
How can we require users to be logged in before they can access the root folders in WordPress?
In SCSS, what is the method for grouping and reusing a set of classes and styles?
How can popen() be used to direct streaming data to TAR?
How does iOS retrieve information from a BLE device?
How can Django Admin accommodate a variety of formats and locales for its input fields?