Get value of last cell in column from another sheet - google-sheets

In Google sheet, when I want to get last value from column A, I use this.
=index(A:A,max(row(A:A)*(A:A<>"")))
It works perfect. Even if there are spaces in between it skips them. This is exactly how I wanted it. But when I want to refer column from another sheet I changed it to this:
=index((AnotherSheetName!A):(AnotherSheetName!A),max(row((AnotherSheetName!A):(AnotherSheetName!A))*((AnotherSheetName!A):(AnotherSheetName!A)<>"")))
And with this I am getting error:
Error Unknown range name:
'A'.
Not getting any clue for the error as I am just replacing column name with sheetname!column name. Can someone please help me out? Thanks.

Your notation for ranges in a remote sheet is incorrect, this should work:
=index(AnotherSheetName!A:A,max(row(AnotherSheetName!A:A)*(AnotherSheetName!A:A<>"")))

Related

COUNTIF with IMPORTRANGE result keep showing only 0 or 1? WHY?

I have one spreadheet that includes name, id and amount of numbers data in it and i want to make the report in other spreadsheet.
i want to count the name column that is not blank, so i type this
=COUNTIF(importrange("gsheet link","Payroll 16-31 Jan!B3:B"),"<>")
but the result is "1" in fact that there are 3670 names on the column
=COUNTIF(importrange("gsheet link","Payroll 16-31 Jan!B3:B"),"<>"&"")
but still not working
can someone help?
I want to get the exact calculation of those data
Two things: have you connected the spreadsheets? If not, use IMPORTRANGE outside COUNTIF, something like =importrange("gsheet link","A1") . Accept the permissions and see if COUNTIF now does it right
If it doesn't, try with COUNTA that is specifically defined for counting non blank cells:. =COUNTA(importrange("gsheet link","Payroll 16-31 Jan!B3:B"))

VLOOKUP Error "did not find value" but value is defenitely there?

I'm trying to match the postcode with the name of the city in another sheet:
=VLOOKUP(C11,PLZ_2021_DE!A:B,2)
Here's the sheet I want the place in
And here the sheet I want to match it with, just column A
Here's the link to the file, I don't get what I'm doing wrong?
Thanks for your help!
delete E2:E rnge and use this in E2:
=INDEX(IFNA(VLOOKUP(C2:C&"", TO_TEXT(PLZ_2021_DE!A:B), 2, 0)
0 coz you want exact matches and &""/TO_TEXT coz C column has probably different formatting than A column assuming due to different cell alignment

Match of an id value and extracing a string in Google Sheets

following problem:
I have a column with wrong Ids
Now I want to watch those wrong Ids with another sheet where I have same Ids and the correct link I want to match with those Ids:
So what I same up with is the following ->
=IFERROR(VLOOKUP(A2,'extract base'"B:F),"")"))
But obviously doesn't work haha. So basically very easy -> if the Id from Sheet 1 matches with the Id from Sheet two put in the second column (in my example custom_label) the value of sheet two column 2
Any help is appreciated, thank you so much!
Your current VLOOKUP formula is not structured correctly at all, and your sheet reference 'extract base'"B:F is also not written correctly. Have you read the basic documentation on VLOOKUP usage and syntax?
Delete B2:B entirely.
Then place the following in B2:
=ArrayFormula(IF(A2:A="",,IFERROR(VLOOKUP(A2:A,'extract base'!B:F,5,FALSE))))
This formula should provide results, if any, for all rows (assuming that your second sheet is, in fact, called exactly extract base).

Condition join in Google Sheets

(1) I am trying to TEXTJOIN email addresses in column F, if column B = a specific value. However, it is giving me all email addresses, regardless of column B value.
=TEXTJOIN(",",TRUE,IF(B$4:B$57="owner",F$4:F$57,""))
Sample table:
The result I am looking for is:
email1#testemail.com,email2#testemail.com
The result I am getting is:
email1#testemail.com,email2#testemail.com,email3#testemail.com
(2) If the formula is on a different sheet, I get an #VALUE! error.
=TEXTJOIN(",",TRUE,IF(sheet1!B4:B57="owner",sheet1!F4:F57,""))
(3) I am trying to have the results be de-duped or unique. Is it best just to add &UNIQUE=[range] within the array?
I'm sure I'm just missing some detail, but cannot figure it out. Any help appreciated!
You need an arrayformula() wrapper:
=arrayformula(TEXTJOIN(",",TRUE,IF(Sheet1!B4:B57="owner",Sheet1!F4:F57,"")))
In Excel 365 your formula works perfectly the way you wrote it .

Why INDIRECT function returns a 1?

I'm trying to return a count of names from another sheet (it's a list of names in Column A and I want to pull the # of individual names into a cell in another sheet). I have many sheets with varying lists of names. I'm using the COUNTA(INDIRECT function, but I keep getting "1" as the result.
=COUNTA(INDIRECT("'"&A2&"'!A:A))")
Can anyone help?
You're nearly there, just have to move the last quote inside the brackets and remove the extra bracket.
=COUNTA(INDIRECT("'"&A2&"'!A:A"))
to account for errors such as "nothing to count" you will need:
=COUNTA(IFERROR(INDIRECT("'"&A2&"'!A:A")))
and btw that was the reason why you were getting 1 from your formula attempt because COUNTA counted the error.

Resources