Vlookup code for a query in Google Sheets - google-sheets

I have 2 different tabs in a sheet and I want to fetch minimum "Age" along with "Father Name" of the given two duplicate names of children.
You can check left tab as what data look like and right tab for what result I want, In right tab No name will occur twice and I have to fetch only the age with minimum number with VLookup or any other function.
I tried Vlookup, with min function but I was not getting desired result.

you can try:
=INDEX(IFNA(VLOOKUP(A3:A,SORT('TAB1'!A:D,4,1),{4,3},)))
Change TAB1 in the formula to your respective tab name

Try the following formula-
=LAMBDA(nm,ag,{nm,ag,MAP(nm,ag,LAMBDA(p,q,FILTER(C:C,A:A=p,D:D=q)))})(UNIQUE(A2:A8),BYROW(UNIQUE(A2:A8),LAMBDA(x,MINIFS(D2:D,A2:A,x))))

Related

Can I add a floating column to a Sheets query?

I have a Sheet like this [minimal] example. The "Data" tab is a running list of points different groups have scored. This is constantly updating. The "Results" tabs gets a list of all the unique group names from the Data tab and add them as a row in Column A. So, if an entry for "Group5" is entered on the Data tab, a row with that name will appear on the Results tab. Similar for the columns on the results tab. Each unique action on the Data tab becomes a column on the results tab.
I would like to add a "Total" column to the last column on the Results tab. The problem is, if a new "action" category appeared on the data tab, it would take up the last column and the Total column would need to shift over one. Is there a way to get the "Total" column to float so that it is always on the end without conflicting with the query formula?
In B1 cell put below formula-
={TRANSPOSE(UNIQUE(QUERY(Data!C2:C, "SELECT C where C is not null",0))),"Total"}
In B2 cell put below formula then drag down and right as needed.
=IF(OR($A2="",B$1=""),"",IF(B$1="Total",SUMIFS(Data!$D$2:$D,Data!$B$2:$B,$A2),
SUMIFS(Data!$D$2:$D,Data!$C$2:$C,B$1,Data!$B$2:$B,$A2)))

Google Sheets: How to search/filter tabs by part of the name

I have spreadsheet with dozens of sheets with long names. It is very hard to find them in the list-menu etc. Is there a way to filter/find by part of the name?
The only way I found is to click Alt+/ and search for "Go To Range", and then type TheRequestedSheetFullName!A1 and jump. The problem is the names contains few words, and it is hard to hit exactly the correct name (I want filtering/searching by part of the name).
Yes. In the upper left corner of any sheet (to the far left of the formula bar), there is a field that, by default, shows the current selection in the current sheet. However, if you click in that field and start typing part of a sheet name, a list of all sheets that match will appear. You can then just click on the sheet you want from the shortlist that appears. By default, you will be brought to cell A1 of the sheet you select.
You can make a summary, then search with Ctlr+F
function listOfSheetsWithLinks(){
var ss = SpreadsheetApp.getActiveSpreadsheet()
var summary = ss.getSheetByName('summary')
summary.getRange('A:A').clear()
ss.getSheets().forEach((sh,i) => {
summary.getRange(+i+1,1).setFormula(`=hyperlink("#gid=${sh.getSheetId()}&range=A1";"${sh.getName()}")`)
})
}

=FILTER arrayformula with

Test sheet
I have an Options sheet that categorizes transactions based on their type. In the Transactions sheet, I add transactions with their corresponding category, and I am trying to create a formula where the corresponding category type is automatically added in the column next to it.
I have been able to create a partially working formula:
=ARRAYFORMULA(FILTER(Options!C:C,Options!B:B=D31))
I want to expand it across all the cells in column E using an ARRAYFORMULA, but I can't seem to figure out how to have the Options!B:B=D with the corresponding cell. Making it =D31 I've been able to figure out, but having one formula at the bottom (at Ref 1) and then the right category type for each corresponding cell, I have not.
use in E2:
=ARRAYFORMULA(IFNA(VLOOKUP(D2:D, Options!B:C, 2, 0)))

Is cell value on other tabs?

In sheets I have a workbook with several tabs. I need to be able to determine if the value in column A is found on other tabs to hopefully eliminate duplicates.
How can I put a formula on each tab that will point out if the value in column A is found on other tabs so we can remove duplicates? The formula would need to have the name of tab to enable us to go through and cleanup?
I know in Excel we could do a vlookup for each individual tab but it seems like there should be an easier way of not having to type the vlookup for each tab and return the name of the tab.

Filter rows according to array in another tab

I am using the follow filter
=FILTER(A2:A,MATCH(A2:A,'sheet 1'!A2:A,0))
Within a custom formula but it's not responding.
If I use
=FILTER(A2:A,MATCH(A2:A,I2:I,0))
It works fine.
Here is a link to a test sheet.
When I add or remove letters to the first sheet the column under the Letters in the second sheet just bellow the orange respond accordingly. I cannot get the filter view to work with the same formula.
Use the following for your filter view formula:
=match(A2:A, indirect("Sheet1!a1:a5"), 0)
Alas, it works only at the moment of applying the filter for the 1st time. Changing the values in Sheet1!a1:a5 will not automatically cause the filter to refresh. The only way to do that is via a =FILTER() formula, not via the UI filter view.
Check your name of the sheet being referenced. Unless you changed the name it should be Sheet1!A2:A.

Resources