NWM returns the number of weeks in a month.
SYNTAX:
NWM(Monthoffset/Date, Week definition)
MonthOffset/Date: If a number it is the One based offset from the Start Date of the report. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it sets the month to calculate for
Common values:
1 = Start Month of report
2 = Next Month after the start date of report
0 = Previous month
Week Definition: "Wn" - Week as defined by n. IE "W7" is Sunday thru Saturday. Click here for a table defining weeks.
EXAMPLES:
In all examples the start date of the report in 1/1/2021:
NWM(1,"W7") - Returns 5 as there are 5 Sunday to Saturday weeks in Jan 2021.
NWM(C4,"W7") - Returns 4 as C4 contains the date "2/15/2021" and there are 4 Sun to Sat weeks in Feb 2021.