Forum Discussion
JacobWilcox
Feb 27, 2024Copper Contributor
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...
- 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.
Harun24HR
Feb 28, 2024Bronze Contributor
Attach the sample file to your post so that we can check named ranges.
- JacobWilcoxFeb 28, 2024Copper ContributorThe file is now attached. Any errors in any cells are due to the switch from Google Sheets to Excel.