1

I have a report that pulls data from a separate sheet using a QUERY. The report has a "notes" column (not part of the query) so users can add notes associated with a particular row. This solution works perfectly when the query is in chronological order but fails (query data doesn't stay grouped with user notes) when I query in reverse chronological.

I'm looking for a solution that will display the data in reverse chronological order while remaining grouped with the associated user entered notes.

Any suggestions are greatly appreciated.

QUERY STATEMENT

=query(data!A2:BK,"select B, C, D, E, F, G, H, I, J, O, P, Q, R, S, T, BA, A where J = 'Industry Tour *approval required' order by A desc",false)

enter image description here

3 Answers 3

1

You might stitch two ranges together and control the sort order with something like:

=QUERY({A1:F10,G1:I10},"select * order by Col1 desc")

changing desc to asc to suit.

1

=TRANSPOSE(QUERY(QUERY({TRANSPOSE(B2:G5);
                        TRANSPOSE(H2:I5)}, 
           "select *", 0), 
           "select Col4, Col3, Col2, Col1", 0))

6

1
  • reverse mirror query
    – user0
    Commented Feb 6, 2019 at 23:57
0

In the case described there are two simple tables that aren't coupled, so the solution is to couple them. To do this add key to both tables, then join them and finally display them as you want. The easier way is to keep the first query unchanged (keep the chronological order) and to add a new query or sort function that returns the data in reverse chronological order.

1
  • Thanks for the feedback. Your solution will work, but I believe it will require the user to interact with two separate sheets in-order to see the reverse chronological data with the notes. Do you know of a way to combine the "user notes" and the "query data" into one sheet the user can edit?
    – Mr. B
    Commented Feb 14, 2017 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.