Please try something like: =query({Sheet1!A1:B10;Sheet2!A1:B10},"select Col1, Avg(Col2), count(Col1) where Col1 is not NULL group by Col1 label count(Col1) 'number of times referenced?', Avg(Col2) 'average'") Adjust ranges to suit those you did not mention. [QUERY](https://developers.google.com/chart/interactive/docs/querylanguage) For your sample not necessary but you might want to insert ` order by Col1 asc ` before the first `label`.