Forum Discussion

JacobWilcox's avatar
JacobWilcox
Copper Contributor
Feb 27, 2024
Solved

Filtering by named range

NOTE: I'm building this in GoogleSheets as per my company's accessibility requirements. Most formulas work similarly to Excel, but not all. Any errors in the Excel version that I added to this post a...
  • djclements's avatar
    Feb 28, 2024

    JacobWilcox One possible formula you could try is the FILTER function with ISNUMBER / XMATCH criteria on the employee names, then AVERAGE the results:

     

    =AVERAGE(FILTER(TableHours, (TableDate>=NinetyDaysAgo)*(TableDate<=TODAY())*ISNUMBER(XMATCH(TableEmployee, Technicians))))

     

    Please note, I don't use Google Docs, so I'm not 100% sure how this formula will translate over to that platform. According to the official Google Docs support page for the FILTER function, the syntax appears to be slightly different than Excel, so you may be able to separate each condition with commas instead of asterisks. I also don't know if the XMATCH function will handle a range of values in the same manner as Excel to generate the desired array of results.

Resources