Match of an id value and extracing a string in Google Sheets - 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).

Related

Google sheet Query formula that use text from one column to match another column returning text from adjacent cell

I have a dropdown text column, Claims!B2:B that is supposed to match Ref!A2:A and select Ref!B2:B text.
I tried
=ArrayFormula(IF($B$2:$B="","", LOOKUP($B$2:$B,Ref!$A$2:$A,Ref!$B$2:$B)))
some results not consistent
=QUERY(Ref!A2:B,"Select B where A = "&B2:B&"")
resulting in error
=FILTER(Ref!B2:B,Ref!$A$2:$A=B2:B)
wrong results and not arrayed.
I like to know what should be the simplest array formula for the scenario and if possible correct my other trials for my learning process.
Sample data attached. sample supplier
Please use
for your Category column
=INDEX(IFNA(VLOOKUP(B2:B,Ref!A2:C,3,0)))
and for your GST Stats
=INDEX(IFNA(VLOOKUP(B2:B,Ref!A2:C,2,0)))
(As you notice the only difference is the column number from 2 to 3)
Functions used:
INDEX
IFNA
VLOOKUP

Google Sheets Filter + Match? Not sure

I have two tabs in a sheet, that have different ranges. One is preset data, the other is an import from a program we use. I'm trying to figure out a way, if possible, to pull specific data from sheet 1, and match it with values in sheet two, that aren't sorted the same.
Example sheet
https://docs.google.com/spreadsheets/d/1OsSWQ_48VrcTU3pXGeJ_1syluKPVeVRune39UA9I3x4/edit?usp=sharing
I'm trying the formula =sort(filter(Sheet1!B1:B,match(B1:B, Sheet1!B1:B ,0)),2,TRUE), but it's just putting the results in order. If I replace the column # on the sort with 1, it sorts it out of order but it doesn't match column B, like I need it to.
The documents i'm working with are 2000+ rows each, I'd rather not manually do this if at all possible.
Please assist? Either way, thank you for reading.
Try:
=arrayformula(iferror(vlookup(MATCH( B1:B,Sheet1!$B$1:B,0),{(ROW(Sheet1!A1:A)),Sheet1!A1:A},2,0)))
Explanation
step#1 =arrayformula(MATCH( B1:B,Sheet1!$B$1:B,0)) will give the row where each value column B will be found in Sheet1!column B
step #2 =arrayformula({ROW(Sheet1!A1:A),Sheet1!A1:A}) will build a virtual matrix whith in column#1 the row and in column#2 the value of Sheet1!column A
finally: join the two formulas as vlookup(___step#1____,____step#2______)

Google Sheets trying to match data from two columns on another tab

I have a formula that works as long as all the data it is trying to match from is in Column A. I need this to also look at the data in column B to see if it matches. I also have another formula that matches two different columns and I also need it to look in both A and B for the data. Both of these are used for conditional formatting. Can anyone help me set these up so it is looking on the Received tab in both columns A and B?
Current formulas that work:
=match($C:$C, indirect("Received!A2:A"),0)
=and(match($I:$I, indirect("Received!A2:A"),0), (match($O:$O, indirect("Received!A2:A"),0)))
What I am trying to do but is not working:
=match($C:$C, indirect("Received!A2:B"),0)
=and(match($I:$I, indirect("Received!A2:B"),0), (match($O:$O, indirect("Received!A2:B"),0)))
Test Doc: https://docs.google.com/spreadsheets/d/1dDrmASkiy4KY8ywVuBLdZzAZtvyTohJBFFWtSte5g8A/edit?usp=sharing
try:
=OR(MATCH($C:$C,INDIRECT("Received!A2:A"),0),MATCH($C:$C,INDIRECT("Received!B2:B"),0))
and:
=OR(AND(MATCH($I:$I,INDIRECT("Received!A2:A"),0),(MATCH($O:$O,INDIRECT("Received!A2:A"),0))),
AND(MATCH($I:$I,INDIRECT("Received!B2:B"),0),(MATCH($O:$O,INDIRECT("Received!B2:B"),0))))

How to retrieve a cell value and write it in another sheet checking two different columns

I have two sheets, Progress and App1stSession, in the same spreadsheet.
Progress sheet has these columns
Date Campaign Sessions 1stSessions
App1stSession sheet these columns
Date Campaign 1stSessions
I need to retrieve 1stSessions values from App1stSession. The match can be done on Date and Campaign values.
I've written this formula
INDEX(App1stSession!$A$1:C,
AND(MATCH($B1,App1stSession!$B$1:B,0),MATCH($A1,App1stSession!$A$1:A,0))),3)
Of course it doesn't work because AND retrieves 0 or 1.
So I've tried this solution
INDEX(App1stSession!$A$1:C,IF(AND(MATCH($B1,App1stSession!$B$1:C,0),MATCH($A1
,App1stSession!$A$1:A,0)),MATCH($C1,App1stSession!$C$1:C,0)),3)
I suppose that the second MATCH could retrieve the right row: neither this solution works.
Finally I've tried
=QUERY(App1stSession!$A$1:A,"SELECT """&App1stSession!$C1:C&""" WHERE
("""&App1stSession!$A$1:A&"""="""&$A1&""")AND("""&App1stSession!$B$1:B&"""="""&$C1&""")")
Again it doesn't work but I suppose because of a matter of syntax.
Any suggestion ?
Thanks
The way I would do it, is insert one unique id column/search key in column A, before the rest of your data, that is dynamically created by the date & campaign values in your App1stSession sheet:
=B1&C1
then use this type of formula to smush the same two values together dynamically on your search sheet in a vlookup fashion on your progress sheet:
=VLOOKUP(A1&B1,App1stSession!A:D,4,false)

Google Spreadsheet - Index Match - Match to Horizontal Column Names

I'm struggling to understand Index, Match and I am wondering if perhaps it is not appropriate for what I am trying to do.
I have several columns of pay codes with pay values in them. I want another column that combines all their values with another sheet that contains a list of the codes and descriptions.
I've tried to get index match to work for me, but I think because I am trying to match the horizontal column names that is what is messing me up.
Can anyone help me understand Index Match where I need to match a column of data to a row of column names and then put only the non-blank cells from the range in a special format?
Here is my sheet sample. https://docs.google.com/spreadsheets/d/175HbwmFf2Z_S_5Q-w6k6DOYC2MXenTefxbKy_y57sfA/edit?usp=sharing
Any help is appreciated, thank you :)
You could try (in F2)
=trim(join(,ArrayFormula(if(transpose($A2:$E2)<>"", transpose($A$1:$E$1&" "&VLOOKUP($A$1:$E$1, Pay_Codes!$A$1:$B, 2, 0)&" - "&$A2:$E2&char(10)),))))
and drag down..

Resources