I'm hoping someone can help with this.
I have two sheets/tabs:
A Database tab that collects links using IMPORTXML.
A spreadsheet that sorts the data.
What I would like to do is automatically categorise certain links from the database tab in certain columns to the sorting tabs.
For example, in column E of the sorting tab is Github. I'd like find the links for Github in the Database tab and sort these appropriately for the matching abbreviation - so I expect and MATCH and INDEX to be involved at some stage as row 1 in the Database tab isn't fixed - the abbreviations header may move.
I am expecting to have a function that searches for "GitHub" in a given search column and returns that cell to the Sorting tab, but I am unable to find a solution for this.
This is an example of the result that I am hoping to achieve, but the screenshot below isn't automated based on data pulled from IMPORTXML, which is the reason for this new spreadsheet.
If anyone can provide help with this, that would be great!
paste in D2 cell and drag to the right:
=ARRAYFORMULA(IF(LEN(INDIRECT("A2:A"&COUNTA($A$1:$A))), IFERROR(VLOOKUP($A$2:$A,
SPLIT(TRANSPOSE(SPLIT(TRIM(QUERY(TRANSPOSE(QUERY(TRANSPOSE(IF(IFERROR(REGEXEXTRACT(
IF(Database!$A$2:$CG<>"", "♠"&Database!$A$1:$CG$1&"♦"&Database!$A$2:$CG, ),
LOWER(D$1)))<>"",
IF(Database!$A$2:$CG<>"", "♠"&Database!$A$1:$CG$1&"♦"&Database!$A$2:$CG, ), ))
,,999^99)),,999^99)), "♠")), "♦"), 2, 0)), ))
Related
I'll try to explain this the best i can.
I've got a database that hardly ever changes on 1 tab and i've got a dynamic table on other tab which is generated with data from the web.
I am trying to set up a formula that changes the outcome based on the colors i selected.
i can't link the original sheet but i tried to put together a small test sheet to make it more clear
https://docs.google.com/spreadsheets/d/114DxB1vqdH9MHuE5jr-iR1WfUdjMk4sY0dtvkCN80Y8/edit?usp=sharing
The linked sheet discribes what i want to get.
i tried allot of formulas and the closest i got gave me only the first result and it was combination of filter and vlookup but i accidently deleted that and can't really reproduce it...
added formula to your sheet. Please test it out:
=ARRAYFORMULA(QUERY(LAMBDA(ax,{PROPER(INDEX(ax,,1)),IFERROR(SPLIT(VLOOKUP(INDEX(ax,,2),A:A&"🐠"&B:B,1,),"🐠"))})(QUERY(SPLIT(FLATTEN(D3:D&"|"&E3:E&"🐠"&TRANSPOSE(G3:G10)),"|",0,0),"Select * Where Col1!=''")),"Select * Where Col2!=''"))
-
Another option it stacks up different queries with REDUCE, also gives you a message if product is not found in that colour:
=REDUCE({A2:B2,"colour"},SEQUENCE(COUNTA(E3:E)),LAMBDA(a,v,{a; IFERROR (QUERY(A3:B100,"SELECT '"&INDEX(D3:D,v)&"',A,B where A = '"&INDEX(E3:E,v)&"' and B matches '"&JOIN("|",FILTER(G3:G,G3:G<>""))&"' label '"&INDEX(D3:D,v)&"' ''",),{INDEX(D3:D,v),INDEX(E3:E,v),"not found in any colour"})}))
try:
=INDEX(QUERY({VLOOKUP(A3:A10, {E3:E10, D3:D10}, 2, ), A3:B10},
"where Col3 matches '"&TEXTJOIN("|", 1, G3:G10)&"'", ))
I'm creating a database on Google Sheets for work and while I'm aware it's not the best solution, due to a number of restraints, that's what I've got to work with atm.
The thing is, I'm creating this for people who don't really know how to work with formulas on Google Sheets so I'm trying to be as user friendly as I can.
I'll use this sample sheet to try and demonstrate what I'm trying to do:
https://docs.google.com/spreadsheets/d/1tXM0IlswQVdwFum9a0pR5NsbtL5Uq_AH1tPbytXGvVg/edit#gid=0
One of the sheets is the Database, which will countain multiple columns of data (there's 10 on the sample, but the actual database is much larger).
There is another sheet called Column Index where I have a list of all columns, what kind of data they represent and a checkbox for people to select what data they want.
Finally, theres a third sheet called Data Extraction and I want to get the checked columns from the Database and send them to this sheet so people can download or copy this data to other worksheet.
It looks like a QUERY situation to me, but I'm not sure if it's possible to do it dynamically
This should do it:
=ArrayFormula(QUERY(
Database!A:K,
"select A,"&
TEXTJOIN(
",",
1,
IFNA(
REGEXEXTRACT(
ADDRESS(
1,
MATCH(
IF(
'Column Index'!C2:C,
'Column Index'!B2:B,
""
),
Database!1:1,
0
)
),
"[A-Z]+"
)
)
)
))
I built the query string, selecting the column indices that we wanted. No need for the "Col Index" Column.
Using Address, we can generate the appropriate column letter using a column address, then we just extract the letters part with a regex.
What I got was not that different as I also tried to construct the query string. The downside is it may be a bit buggy (but it works)
Here it is:
=query(Database!A1:K15,"select A,"&join(",",ArrayFormula(SUBSTITUTE(ADDRESS(1,filter(row('Column Index'!C2:C11),'Column Index'!C2:C11),4), "1", ""))))
Now this following query runs great on one column and does use a space as a search separator however it only seaches one column.
=QUERY(Data!A1:O, "SELECT * WHERE LOWER(N) LIKE LOWER(""%" &JOIN("%"") AND LOWER(N) LIKE LOWER(""%", SPLIT(B1," "))&"%"")",1)
However then I found this snippet and that searches the entire sheet but cannot separate words within a cell.
=ARRAY_CONSTRAIN(IFERROR(QUERY({Data!A:O, TRANSPOSE(QUERY(TRANSPOSE(Data!A:O),,99^99))}, "where lower(Col16) contains '"&LOWER(B1)&"'", 1)), 99^99, COLUMNS(A:O))
The issue is I want to search multiple of my columns namely D,E,G,H,M,N where M contain multiple words that should be searched separated by a comma and space since the data comes from a form.
Is there a way that makes it possible to achieve this?
Link to a very obfuscated sheet upon request data is somewhat similar yet document is very simplified and shortened.
https://docs.google.com/spreadsheets/d/1PxdObZsn62rQ3QeYVdy9HjToIHZsmw1d0cXK2jOuiC4/edit?usp=sharing
Solution
In this case you should use the same approach you were using before, but now when searching in the built Col16:
=ARRAY_CONSTRAIN(IFERROR(QUERY({Data!A1:O, TRANSPOSE(QUERY(TRANSPOSE(Data!A1:O),,99^99))}, "where lower(Col16) LIKE LOWER(""%" &JOIN("%"") AND LOWER(Col16) LIKE LOWER(""%", SPLIT(B1," "))&"%"")", 1)), 99^99, COLUMNS(A:O))
I've tried looking for an answer to this online for a few hours now, but I just can't work out how you'd describe it, or find an appropriate answer.
I have a spreadsheet where I'm wanting to pull out an ID in Column A into a separate tab, but only if it contains a certain phrase that's contained in Column E. In this separate tab, I then don't want there to be any gaps in between the IF statements.
So for example I want the next tab to pull through the Action ID if column E contains 'Client'. If it doesn't, it searches the next row and so on until it finds one that does contain 'Client'. Row 2 on the separate tab would then continue the search, but it wouldn't be filled with something if it doesn't find the word 'Client' - it instead would continue searching down until it found one that has the word in.
So for example - if the first ID that contains the right phrase is in Row 5, I want it to appear on the separate tab in Row 2, underneath the heading. Then, if the second ID with the correct phrase in column F is in Row 11 for example on the main tab, I then want it to be pulled through to Row 3 on the separate tab. And so on..
This will then allow me to do lookups for the rest of the values I want to input on the separate tab.
I've tried as many different IF statements as I can, but it's just not having it.
Any advice would be really appreciated.
You can use INDEX and AGGREGATE combination:
=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,1/($E$2:$E$6="Client")*ROW($E$2:$E$6)-1,ROW()-1)),"")
In Google Sheets you can use FILTER (docs) for that. Place it in the top cell of your column.
={
"Your Header";
IFNA(FILTER(A2:A, B2:B = "Client"))
}
If A2:A and B2:B are from other tab named My Tab it will be 'My Tab'!A2:A and 'My Tab'!B2:B.
I need help. I have a google form to populate the responses into Google Sheets. in google sheets I have the sheet with the results and a master sheet that I want to search the results sheet to find a reference number across certain columns of the sheet sorted by date and if the value is found then for it to reference a specific cell value from the row that result was found in.
any help would be VERY much appreciated!
https://docs.google.com/spreadsheets/d/1OPvK5QSniZEwHhR60zT-4L8IB64A_ZxfOqpcc0rwkX0/edit?usp=sharing
I've been trying h/vlookup and index match but I'm quite a novice at this so I'm probably doing something wrong.
Basically, the scope of this is to track checked in/out assets showing their status and where they are.
=ARRAYFORMULA(IFERROR(VLOOKUP(B3:B, QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(
QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF('Asset Movements'!G2:O<>"", "♦"&'Asset Movements'!G2:O&"♠"&'Asset Movements'!B2:B, ))
,,999^99)),,999^99), "♦")), "♠")), "OFFSET 1", 0), 2, 0)))
I think you are looking for this: Search a value from another tab/sheet in google sheets based on cell reference
It creates a search page in google sheets where the user enters a value in one cell(s) and then other cells auto-populate with values from another tab/sheet based on the value entered in the search cell(s). It has a working sheet example. You can try it so that by for example entering your 'Bin Asset No.' in the search cell as reference it will give you the matching 'Bin Size', 'Status'.
The formula shared by #player0 works too.