I would like to find the most recent three results (front top to bottom) in a Google Sheet where column L is "Signed" and the result (column T) is not 0 or blank.
I have the below so far which gives me the first result but not filtered by column L and not excluding 0 or blank cells.
=ARRAYFORMULA(IFERROR(INDEX('Print List'!T$2:T,SMALL(IF("Alex"='Print List'!A$2:A,ROW(A$2:A)-1),1))))
(edit: or rather than ignoring 0 or blanks - column F must be "Sold" so could also filter by that.)
I need to display the results for 1st, 2nd and 3rd in separate columns so will replace the 1 at the end of the above with appropriate number.
Hope I have explained myself ok and any help received will be greatly appreciated.
You might try this off to the side somewhere, or on a different tab, where I assume your tab name is Sheet1:
=TRANSPOSE(QUERY('Print List'!A:T,"select T where T>0 and L='Signed' limit 3"))
After a bit more digging I have got it to work! Thanks Matt for pointing me in the right direction.
=IFERROR(INDEX(ARRAY_CONSTRAIN(QUERY('Print List'!A:T,"select T where A='"&$A2&"' and T>0 and L='Signed'",0), 1, 1), 1),"")
EDIT: Improved again using Matt's edited suggestion:
=IFERROR(TRANSPOSE(QUERY('Print List'!A:T,"select T where A='"&$A2&"' and F='Sold' and L='Signed' limit 3","")),"")
Thank you.
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)&"'", ))
Good Evening and thanks in advance for taking the time to read and help.
I have a 3 column excel file which I am trying to populate the 3rd column with a return value found next to the row its found in.
so for example I want to look at column MANAGERSFULLNAME for value
Cheryl Rommelfanger and find the match in column FULLNAME. Once the match is found I want to populate MANAGERSX2FULLNAME but not with the value found in FULLNAME but with the value next to in column MANAGERSFULLNAME
So for this example we look in MANAGERSFULLNAME for Cheryl Rommelfanger and find the match in FULLNAME Cheryl Rommelfanger then populate MANAGERSX2FULLNAME with
William Dearth
FULLNAME MANAGERSFULLNAME MANAGERSX2FULLNAME
Dena Peters Cheryl Rommelfanger
Kyle Marsh Melissa Hall
Cheryl Rommelfanger William Dearth
ive tried a few things and can only get a count not the value next to it.
=MATCH($E2&$F2,INDEX($B2:B4000&$C2:C4000,),)
=IF(ISERROR(MATCH(E2,F2,$B$2:B$4000,$C$2:C$4000,0)),"",E2)
=IF(ISERROR(MATCH(L2,$K$2:K$4000,0)),"",L20)
any help would be greatly appreciated.
So I apologize but I am having a bit of trouble understanding your columns, but the general idea is clear.
Your attempts are really close. You want to use index(match) as opposed to match(index). The link below describes how to do this.
Index match formula
If I'm understanding you correctly it sounds like you're trying to find and list the bosses boss so-to-speak to display a hierarchy of sorts. I'm using just columns A, B, and C (C being the managerx2fullname) this formula should work fine:
=index(B$2:B$4000,match(B2,A$2:A$4000,0))
You will of course need to change the columns to fit your needs. Don't include a dollar sign in B2 because you want this to increment as you drag the formula down the column. The link below shows a screen shot from my test. In it we see that in row 2 John is Adams boss, who in turn is Joe's boss. I think that's what you're shooting for here.
Screen shot
I have raw data in my spreadsheet that comes from a Google Form that looks like the following:
(Cost) (Source) (Frivolous) (Medium) (Comments)
A B C D E
1 15.94 McDonalds Yes Credit was hungry
2 98.32 School No Check Paid for textbooks
3 843.00 Hospital No Check Surgery
4 0 asdff Yes N/A Ignore this one woops
5
6 23.99 Dentist No Credit Check up
I want this data to always be copied to a different sheet, but ONLY the data that matches a condition. That condition in this case is if Frivolous is No, meaning I only want on this separate page to track valid important spending.
My second page I want them to look like the following:
(Cost) (Source) (Frivolous) (Medium) (Comments)
A B C D E
1 98.32 School No Check Paid for textbooks
2 843.00 Hospital No Check Surgery
3 23.99 Dentist No Credit Check up
Notice how empty entries are ignored and also entries with Yes under Frivolous are ignored as well.
How would I achieve this? I have absolutely no idea how that would work since I've only been able to achieve this through filter which will not work for this.
I would like to say a few words in defense of Google Spreadsheets and show some great functions that will work, but they are not supported by [excel].
Query
First you may use simple query:
=QUERY(sheet1!A:E,"select * where C = 'No'")
This single short formula will give the desired result, there's no need to fill right and down.
Filter
Actually you may use filter too. This function seems to work too:
=FILTER(sheet1!A:E,sheet1!C:C="No")
Please, read more info about this functions:
Filter
Query and full Query Language Reference
You'll find many exciting things that could be done in Google spreadsheets.
Actually, I was having some trouble with [google-sheets] ArrayFormula function so I used an old-school formula with SMALL and INDEX function in its array form. In A2,
=iferror(index(Sheet13!A$1:A$99, small(index(row($1:$99)+(Sheet13!$C$1:$C$99<>"no")*1E+99, 0, 0), row(1:1))), "")
Fill both right and down.
So you were in fact correct that this could be solved in [excel] with an identical solution as [google-spreadsheet]. However, there are superior methods in newer [exce] (2010+) using the AGGREGATE function that [google-spreadsheet] does not support and I'm sure that [google-sheets] has more elegant functions that I am not recalling right this moment.
Look to Sheet13 and Sheet14 here for the working sample.
I have 2 rows in a table. Each row contains a primary key, and 5 additional columns, whose value may be 1, or 0.
So for example one of the columns is "TermsAccepted" and another is "CopyrightAcknowledged"
Row 1's "Terms Accepted" might be 0 or 1, and row 2's "Terms Accepted" might be 0 or 1 as well.
I'd like to know if at least one of the rows contains a 1 for each column. Do I have to use 5 subqueries to do this (I'd like to just have one row returned that tells me if any of the columns have 1's in them). It doesn't matter to me how many had 1, just so long as at least one column did.
Hopefully that made sense. How could I write a query to do this? I'm using SQL Lite. I'm somewhat stuck. Thanks so much!
Note: I can just return both records, and then use Swift (the programming language i'm doing this in) to just parse each column in each row and look for a 0 or a 1, but I was hoping for something in SQL to make it more elegant if possible.
I think this should work but if anyone could confirm that would be great, thanks!
SELECT
max(TermsAccepted),
max(CopyrightAcknowledged),
max(LoggedIn),
max(LockedOut),
max(AccountCopied)
FROM MyTable
I am new to spreadsheets and I need some help.
I created a sheet to register money to be reimbursed.
What I want to do is:
a) The total shows the total amount in Column 'C' but it will subtract the row value only if/when Column 'E' says yes.
b) The total should be on display all time in the merged cells on 'F'.
I was using this:
=SUMIF(E2:E9; "Yes"; B2:B9)
But I think am Way off.
Any kind of help is welcome.
Spreadsheet for reference: Link here
Does this formula work as you want:
=SUMIF(E:E;"No";C:C)