Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to sum data from multiple rows and columns according to unique search key in google sheets?

I am trying to sum the average total sales of each employee in this table. For example, Tim sold ten vehicles day 1, nine day 2, and eleven day 3, for an average of 10 per day. I tried using vlookup at first but this will only grab the first search_key, so because Tim shows up 3 times, I only get the result of the first day. Is there a way to use a similar function to vlookup (maybe filter?) to grab all of the columns each time the employee’s name shows up, then average the total sales?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

try:

=ARRAYFORMULA(QUERY({A2:A10, MMULT(C2:E10*1, SEQUENCE(COLUMNS(C2:E10), 1, 1, ))}, 
 "select Col1,sum(Col2) where Col1 is not null group by Col1 label sum(Col2)''"))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading