G-SHEET lookup with multiple criteria horizontal and vertical - google-sheets

If you could help me finding a formula that would solve my problem that I've been searching for a solution a few days now
So in my "feuil 1" I have what I'm searching for according to multiple values
-the aircraft number
-data 1
-cell number
-exit date (the value that I'm looking for)
And in another sheet "LH Synthèse" (the database) I have the aircraft number and data 1 in the same row and the cell number that will give me the exit date according to a specific aircraft and data 1 is the column value
What I want to do with this spreadsheet is to have a formula that is going to give me the exit date (present in the sheet "LH Synthèse") according to the values that are in the column A, B, C in the sheet "feuil 1"
The link of the spreadsheet in case my description isn't clear enough
https://docs.google.com/spreadsheets/d/1W4jVDT4wiui5h7i9Sx9rptyLnExhQvn9ICEDTFyat0E/edit?usp=drivesdk
Thanks for your help in advance
What I tried:
Index and match function
Filter function
Vlookup

use:
=INDEX(IFNA(VLOOKUP(A2&B2&C2; SPLIT(FLATTEN('LH Synthèse '!A3:A100&'LH Synthèse '!B3:B100&'LH Synthèse '!C2:K2&"×"&'LH Synthèse '!C3:K100); "×"); 2; 0)))

Related

How do I filter a large dataset in Google Sheets without getting duplicates returned?

I am trying to create a new worksheet in a Google Sheets doc where I need to filter a Master data set based on values in a specific column.
I originally did a VLOOKUP in each specific column that I wanted returned but it brough back blank rows for the corresponding rows that did not match, and eventually it broke for some reason and stopped returning the correct data.
I have been trying to find a new way to do it and have most recently been trying XLOOKUP, but it returns duplicate rows of each correct match.
The original datasheet is mostly populated itself by VLOOKUPS, drawing in information from other trackers so I feel this must be why it is falling over.
The dataset looks roughly like this:
ID
Y/N
Last Name
First Name
col
col1
col2
etc
1
Y
SMITH
A
Cell 1
Cell 2
Cell 1
Cell 2
2
N
JONES
B
Cell 1
Cell 2
Cell 1
Cell 2
There are 40+columns in the tracker but I basically want to have a new sheet where I filter and return only the 'Y' values in the Y/N column, and return columns A:N (including the ID column) without leaving blank rows between the matches, and without returning dupllicates.
I have tried everything I can think of but I just cannot make it work, so any help on the matter would be GREATLY appreciated.
Thanks for reading.
try:
=FILTER(Sheet1!A:N; Sheet1!B:B="Y")
You can also try along with player0 answer, if you want also to import the headers:
=Query(Sheet1!A:N,"Select * Where B = 'Y'"),TRUE)

Google Sheets Get The Value Matching Closest Date

I am working on Google Sheets and my data is Col A Date and Col B Item Name and Col C Item Rate.
I want to get item rate based on Item name but the rate should be nearest to a particular date entered by me. Check the below link of the sheet for better understanding.
https://docs.google.com/spreadsheets/d/16Zq-MFL0AMNRWpich2_woxwxxlciKPMOMrL_gfv1szE/edit#gid=0
Any help on above will be greatly appreciated.
Try, using query, sort (desc) and index
=index(query(A:C,"select A,C where B='"&G2&"' and A<=DATE'"&TEXT(F2,"yyyy-MM-dd")&"' order by A desc limit 1",0),1,2)
edit, with arrayformula
=iferror(arrayformula(vlookup(G2:G&"~"&F2:F,
ARRAY_CONSTRAIN(sort({unique(filter(B2:B,B2:B<>"")),unique(filter(B2:B,B2:B<>"")),sequence(counta(unique(B2:B)),2,0,0);B2:B&"~"&A2:A,B2:B,A2:A,C2:C},2,1,3,1),
count(A2:A)+counta(unique(B2:B)),4)
,4,1)))
or with a space in place of 0
=iferror(arrayformula(vlookup(G2:G&"~"&F2:F,
ARRAY_CONSTRAIN(sort({unique(filter(B2:B,B2:B<>"")),unique(filter(B2:B,B2:B<>"")),sequence(counta(unique(B2:B)),1,0,0),transpose(split(REPT(" ,",counta(unique(B2:B))),","));B2:B&"~"&A2:A,B2:B,A2:A,C2:C},2,1,3,1),
count(A2:A)+counta(unique(B2:B)),4)
,4,1)))

How to repeat a value specified number of times in Google Sheets

How to repeat a value specified number of times in Google Sheets, assuming no overlap or ignoring overlap if any.
Screenshot of the example with ID in column B and Nights in column C.
Trying to reach desired output (column D) with reservation ID repeated the specified number of nights.
Link to example
Your sheet is "Comment only." But try deleting everything from Col D (including the header) and placing the following formula into cell D1:
=ArrayFormula({"ID Full Stay"; IF(A2:A="",,IF(ROW(A2:A)>(VLOOKUP(ROW(A2:A),FILTER(ROW(C2:C),C2:C<>""),1,TRUE) + VLOOKUP(ROW(A2:A),FILTER({ROW(C2:C),C2:C-1},C2:C<>""),2,TRUE)),,VLOOKUP(ROW(A2:A),FILTER({ROW(C2:C),B2:B},C2:C<>""),2,TRUE)))})
This one formula will produce the header (which you can change as you like within the formula itself) and all results for all rows.

Google Sheets formula find highest or average from different sheets based on name

Hello stackoverflow, i want to fill cell on Sheet B based on Sheet A data. i tried some guide "Max If (Max Value with Condition)" but its doesnt work give 0 (zero) value instead.
thank you
try:
=QUERY(SheetA!B:G; "select B,max(G),avg(G) where G matches '^[0-9]+' group by B")

Filter by Date range and sum Row values by Column (in Google Sheets)

Do you have a suggestion on how to make a formula for the problem written in the title?
Here is the example so that you can get an idea of the data format:
Name,Location,Category,Total views for your listing,Total uniqe page views for your listing,Average time on page (listing),total,Facebook,Reviews,Telephone,Treatment Menu,Get Directions,Book Appointment,Enquiry,Instagram,Date
John,NSW Sydney,Apple,1,1,0:00:12,0,0,0,0,0,0,0,0,0,13/Nov/2018
Mike,NSW Sydney,Orange,1,1,0:00:10,0,0,0,0,0,0,0,0,0,13/Nov/2018
Kenny,NSW Sydney,Pear,1,1,0:00:00,4,1,1,1,1,0,0,0,0,13/Nov/2018
John,NSW Sydney,Apple,20,1,0:00:12,0,0,0,0,0,0,0,0,0,14/Nov/2018
Chris,NSW Sydney,Orange,1,1,0:02:48,3,0,0,1,1,1,0,0,0,14/Nov/2018
Stef,NSW Sydney,Orange,10,1,0:07:22,6,1,1,0,1,0,1,1,1,14/Nov/2018
So, the issue is in making a formula that gets put into cells containing numerical values (from D to O), for each of the Name rows.
What it should look like is:
for John and for 13th and 14th of November, the cell in column B in that row should be 21
for Mike for 13th and 14th, it returns 1
for Jenny, which is not on the list, because she didn't have any values in any of the numerical columns for that day (or a group of days), it should return 0
All of these should appear in the "Main Dashboard" sheet, while the data is stored in the "directory statistics" sheet.
The predefined list of all the possible Names, Categories and Locations is in the "customList" sheet. This means that we don't need to search through the whole dataset of all the values for all the dates, but rather only search through the Names in the "customList". "Name" should be the key value that connects values in different dates.
So far, I have tried with this formula:
=Filter('directory statistics'!A2:A,'directory statistics'!$P2:$P=$P2)
It looks for the name column (A) and then returns the value if the date entered (in P2) matches the value in that sheet for the date column (P)
And then I got stuck! :)
Thank you!
I'm not sure why FILTER. Assuming Name in A1, and Row 1 and ColumnA in Main Dashboard set up as in my image, then:
=SUMIFS('directory statistics'!D$1:D$7,'directory statistics'!A$1:A$7,$A2,'directory statistics'!P$1:P$7,">="&B$1,'directory statistics'!P$1:P$7,"<="&C$1)
in B2 and copied down would appear to me to achieve the results you seek.

Resources