0

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.

  • https://stackoverflow.com/a/59467576/5632629 – player0 Dec 22 '20 at 10:12
  • As player0 has indicated, this is doable, but a little tricky. It would help if you had more realistic data in your sample sheet, instead of everything being called "item x". Specifically, what columns (in your raw data) do you need to be able to sort by? And is the filter always applied to the item name, or some other column(s). – kirkg13 Dec 22 '20 at 17:45
  • I attempted player0's solution but found it tricky as I needed static user entered data to be also automatically updated with the dynamic data. It may work, but I was unable to achieve it. The filtering was not correctly implemented yet, that was just an example to generate dynamic data. I eventually got it working in one way - the solution I ended up using was to use the script written by Max Makhrov in https://stackoverflow.com/questions/40738862/how-to-lock-content-of-a-dynamically-generated-cell-with-another-cell – L. aurelin Dec 23 '20 at 09:20

0 Answers0