Sorting QUERY output alongside user entered data in Google Sheets - google-sheets

I'm having trouble thinking about how to sort the results of a google sheets function alongside user entered data in adjacent cells.
Example sheet: https://docs.google.com/spreadsheets/d/1YfV93o8WEEgSG19WhbKOH1JBX5uIIz9YKVQLWSoA_Ik/edit?usp=sharing
For example, I've performed a case insensitive search function on a full list of raw data in columns Q to T using
=QUERY(Q:T, "WHERE (LOWER(Q) contains '"&LOWER(C12)&"')",2)
Image of implementation
This fills columns B,C,D,E as desired. In columns F,G I would like users to be able to add their name and the quantity of items they would like sent to them. I can sort the query results (let's say alphabetically by B) by just encapsulating it in SORT() or adding "order by" in the query, but the user entered data in columns F,G is not sorted along with this. Please could I have some ideas on how to achieve this? I'm at a loss after searching for existing questions.

Related

(Google Sheets/Google Forms) I'd like to be able to collect live data from different columns and have them populate one column instead

I'm collecting data from a Google Form that allows the user to choose which language they'd like the survey to be in, and based on his/her answer, the Google Form will utilize branching to lead them to the questions in the language he/she chose. For example, if they choose 'English,' a question they will answer is 'Full Name,' while if they choose 'Español,' they will answer 'Nombre y apellido.'
This leads the spreadsheet to collect the data from those questions into two separate columns. Is there a way to set up the spreadsheet so it organizes the data from the same translated questions into columns? The form will be receiving data constantly. I've tried stacking the columns using this formula template: ={A2:A5;D2:D5}, but the formula simply moved cells whenever data was added from the Google Form. I am collecting multiple points of data in 6 different languages, and I'm really hoping there's a way to organize this data to make it much less cumbersome to wade through.
If you have any ideas, please let me know! I'll try whatever you've got. 😅 Thanks!
You can union the column values, using open ranges, and then filter out the empty values using =QUERY() or =FILTER().
This way you'll be effectively joining values from different columns as one.
For example if you wanted to join data of columns A, D and E, you could do:
Using QUERY
=QUERY({A2:A;D2:D;E2:E}, "select Col1 where Col1 is not null")
Using FILTER
=FILTER({A2:A;B2:B;E2:E}, {A2:A;B2:B;E2:E} <> "")

Formula for looking up and filtering data from a sheet

I want to do a complex formula using google sheets:
I have a list of place that will be visited by different people.
Some places are not to be visited, marked with /
Some places need to be assigned, marked with ?
Wanted outcome:
A list of cells that changes every day automatic.
An overview of who is going where that day and what needs to be assigned.
So I need a formula that can select a row based on today() and then filter out Persons in that row. Then for each person, another formula that looks up the first row in the table and puts duplicates together.
Example:
Wanted outcome:
Link to excel file, but it needs to work in google sheets too: xlsx
My solution is not the most elegant but it does the job.
First I build a column with date and unique persons or ? in this column:
=unique(sort(transpose(index(A1:H10,match(today(),A1:A10,0)))))
Then I find Places corresponding to these persons (I use filter function for it and then I use textjoin to keep them in single cell).
The formula is copied down as filter function does not accept a range and arrayformula as a filtering criterium.
My solution is available here:
https://docs.google.com/spreadsheets/d/1GTy_UaFP8LbA8OLnEhT_R_twpDCIWCuvQfBAigqtbR0/copy

filter multiple sheets using data validation

I have a workbook with four sheets and want to make a dashboard. In the dashboard I have 4 data validation drop down lists (Part, Date, Shift, Part Number). I want when someone selects the value from the drop list to look for the data that relate to the selections. I currently have =FILTER('sheet1'!A5:FP,('sheet1'!C5:C=Dash!A6)*('sheet1'!A5:A=Dash!A4)*('sheet1'!H5:H=Dash!A8))"Sheet 1" is the name of the sheet I want the data pulled from, however because the first parameter of =FILTER is range it wont allow me to reference my data validation dropdown found in A2. Is there a way to have the filter function look at what is in A2 and give me the data from the selected sheet, and how? Thank You in advance!
I think you are looking at the indirect function in google sheets, please try:
=FILTER(
Indirect(A2&"!A1:FP"),
(Indirect(A2&"!C5:C")=Dash!A6)*(Indirect(A2&"!A5:A")=Dash!A4)*
(Indirect(A2&"!H5:H")=Dash!A8)
)

Is there a way to filter or query unique results where unique is determined by one column but all columns are returned?

My data source range is A:AK (A6:AK1478).
The data is content (blogs, videos, etc) titles, authors, ratings, etc.(A:J) and values for how they map to categories (K:AK).
A:J is text data.
K:AK is numerical data.
There are duplicate entries I cannot remove. The title of each piece of content is in column F; this is the only column I look at to determine duplicate values.
I want to query or filter (which is better?) all of this data into another sheet in order to obtain actual sums from columns K:AK. I want the formula to:
Return all columns and rows from original data, AND
Disregard duplicates only in column F
I do not want to delete duplicates from the original source.
So far I have tried query and filter but no luck. I'm not an expert at advanced formulas, so any advice would be much appreciated!!
I'm very sorry also that I cannot share this spreadsheet as it is work-related. I'm happy to answer any questions I can though.
I have tried =unique(query() and =unique(filter() but this doesn't work because I can't figure out how to set column F as the range to look at for duplicates AND I want all columns returned, not just column F.
update: Here is a screenshot of my current query output
try it like this - instead of UNIQUE use internal QUERY parameter group by:
=QUERY(DLEs!F6:AK1478,
"select F,sum(G),sum(H),sum(I),sum(J),sum(K),sum(L),sum(M),sum(N),sum(O),sum(P),sum(Q),sum(R),sum(S),sum(T),sum(U),sum(V),sum(W),sum(X),sum(Y),sum(Z),sum(AA),sum(AB),sum(AC),sum(AD),sum(AE),sum(AF),sum(AG),sum(AH),sum(AI),sum(AJ),sum(AK)
where F is not null
group by F", 0)

Using VLOOKUP with an additional VLOOKUP on FALSE

I am trying to use vlookup in Google Sheets to populate my price data in my inventory database called "Food Inventory". The data I am looking to match is the "description" which is the A column in all three sheets.
I have a price data sheet with a named range pricedata and an Old Price Data sheet with a named range oldprice.
I would like to find the most current price data and if there is no match look in the Old price data sheet.
Here is the formula I am using which is not working:
=VLOOKUP(A3,PriceData,4,0),VLOOKUP(A3,oldprice,4,0)
I would prefer not to use array formulas, if possible.
Almost there but one can't link two VLOOKUPs with just a , in the way you attempted. If the first attempt (in PriceData) fails an error will be returned. This can be used to trigger the second attempt with IFERROR:
=iferror(VLOOKUP(A3,PriceData,4,0),VLOOKUP(A3,oldprice,4,0))

Resources