Created
June 16, 2023 08:05
-
-
Save Mohammedkb/81dab561999afcf555fbb63af3ddeebd to your computer and use it in GitHub Desktop.
CountWeekday Function with Excel Advanced Formula Environment (AFE) to count a specific weekday between two dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CountWeekday = LAMBDA(StartDate, EndDate, WeekdayNumber, | |
LET( | |
DateRange, ROW(INDIRECT(StartDate & ":" & EndDate)), WeekdayRange, WEEKDAY(DateRange), WeekdayFound, N(WeekdayRange=WeekdayNumber), CountWeekday, SUM(WeekdayFound), CountWeekday | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment