I have in my Google Spreadsheet two separate tabs containing each one a table as showed hereafter:
Tab 1 Tab 2 ______________________________ _________________________ |Client |Date |Sum | |Client| Date | Sum| |------------------------------ -------------------------- |Dan | 27/07/2014 | 5 | |Sam | 12/07/2014 | 6 | |Sam | 02/07/2014 | 5 | |Nat | 12/07/2014 | 6 | |Alex | 13/07/2014 | 2 | |Tom | 13/07/2014 | 3 | |Tom | 13/07/2014 | 10 | |Dan | 27/07/2014 | 2 | ------------------------------- -------------------------|
I would like to get to merge these 2 tables and get rid of doublets by putting all the rows containing the same "Date" and "Client" couple and adding the values of the "Sum" field. Here is what I would like to get:
Client Date Sum Dan 27/07/2014 7 Sam 02/07/2014 5 Sam 12/07/2014 6 Alex 13/07/2014 2 Nat 12/07/2014 6 Tom 13/07/2014 13
As you can see, here I just merged those 2 tables and eliminated the doublets
1) "Dan"&"27/07/2014" the sum of their "Sum" values making "7" 2) "Tom"&"13/07/2014, the sum of their "Sum" values making "13"
How can I get it using Query function? Can anyone help me?