Search code examples
google-sheetscountmaxaveragegoogle-query-language

Google Sheets formula find highest or average from different sheets based on name


enter image description here

Hello stackoverflow, i want to fill cell on Sheet B based on Sheet A data. i tried some guide "Max If (Max Value with Condition)" but its doesnt work give 0 (zero) value instead.

thank you


Solution

  • try:

    =QUERY(SheetA!B:G; "select B,max(G),avg(G) where G matches '^[0-9]+' group by B")
    

    enter image description here