Forum Discussion
Shaney123
Oct 09, 2024Copper Contributor
VLookup Formula
I need to lookup a weekday value (say Sunday) in column 2 then return the average of the "Sunday" values in column 3. Can this also be done by using a cell to type in the number of weeks you wish t...
Patrick2788
Oct 09, 2024Silver Contributor
If you're using Excel 365 (or 2021 or 2024) the best function for this task is FILTER.
=LET(
filtered, FILTER(Demo[Actual NCO], Demo[Day of Week] = input, 0),
AVERAGE(TAKE(filtered, -previous))
)The attached workbook will step you through the solution.
- Shaney123Oct 09, 2024Copper ContributorMany thanks!! I will try this!!
- Patrick2788Oct 09, 2024Silver ContributorYou're welcome!
- Shaney123Oct 09, 2024Copper ContributorThis works extremely well!! Just needing to tweak it a bit and I can't seem to get there. I added a 4th column labeled "Include" where I can add an "N" if I don't to include that day's data. I was trying to wrap the formula in an IF statement to first look at the "Include" column for an "N" and if found, ignore that row but it didn't work. Any help you can provide would be greatly appreciate!!