I have built quite a basic CRM system, each client has a sheet, on that sheet there's a form that populates information on rows related to what been inputted. the idea is to standardize information from a generic google sheet.

I have a master sheet that has, in A1 =QUERY({'client number one.'!A24:O;clienttwo!A25:O;'client number three'!A25:O},"select * where Col1 is not Null",1)etc..

Which works well, it populates the information from the other sheets in one place. Sometimes I need to duplicate a row and change one cell/ column of data.

The problem I face is that I need the most recent row to be visible, and to be able to remove the duplicate row so that my overview doesn't "double count" but I also need the historical data for pricing etc.

On a sheet with a Query populating the information, how I can I remove duplicate rows in a semi/ fully automated way?

  • Welcome. Please read how to and share a test sheet so as you can be easier helped. Jan 12, 2021 at 15:57
  • @Gregor, we don't know what kind of data you have in A:O of these sheets. I assume that date is in one of them, but which? What other kinds of unique information exist (e.g., client name? client ID?) that we could use to help construct such a formula for you? Keep in mind that we can't see what you are seeing. At the very least, please let us know in which columns date and some other unique client identifier would be.
    – Erik Tyler
    Jan 12, 2021 at 19:51

1 Answer 1


To remove duplicate rows use UNIQUE



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.