I have a Google Spreadsheet that spans 3 (work)Sheets. On the first page I have a set of rows with customer data.
That looks like
C D E
Joe - 100
Bob - 200
Joe - 300
Jane - 50
And on sheet 2 I have a column with a formula that attempts to query those values and sum the purchase values for each customer (col E).
The formula I tried to use which fails is:
"=(QUERY('data'!B40:E60, "Select C, Sum(E) where C contains """&A18&""" Pivot C"))
In all seriousness though I really don't care about selecting C this is just the 20th variation I tried. What I am trying to do is sum E for all rows where C matches the cell A18 which is the customer name on sheet 2.
You can use the following basic syntax to sum values across multiple sheets in Google Sheets: =SUM(Sheet1! A1, Sheet2! B5, Sheet3!
Here's how it works:Open the Google Sheets document containing the data you want to query. Note down the name of the sheet and the range of cells you want to query. Copy the URL of that document up to the last forward slash. Go back to the document where you want the data to appear.
Try:
=QUERY('data'!B40:E60, "Select C, Sum(E) where C = '"&A18&"' group by C")
and see if that works ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With