MONTH Function
Summary
The Excel MONTH function extracts the month from a given
date as number between 1 to 12. You can use the MONTH function to extract a
month number from a date into a cell or to feed a month number into another
function like the DATE function.
Purpose
Get month as a number (1-12) from a date
Return
value A number between 1 and 12.
Syntax
=MONTH (date)
Arguments
date - A valid Excel date.
Usage notes
The MONTH function extracts the month from a given date as
number between 1 to 12. For example:
=MONTH("23-Aug-2012") à returns 8
=MONTH("11-May-2019") à returns 5
You can use the MONTH function to extract a month number
from a date into a cell or to feed a month number into another function like
the DATE function.
Dates are serial numbers in Excel and begin on January 1,
1900. Dates before 1900 are not supported. To display date values in a
human-readable date format, apply the number format of your choice. Date must
be a valid Excel date. MONTH will return a #VALUE error on text values.
Working days left in month
formula
=NETWORKDAYS(date,EOMONTH(date,0),holidays)
Explanation
To calculate the number of workdays remaining in a month,
you can use the NETWORKDAYS function. NETWORKDAYS automatically excludes
weekends and it can optionally exclude a custom list of holidays as well.
Custom workdays / weekends
To work with custom weekends (i.e. weekends are Sunday and
Monday etc.) switch to the more robust NETWORKDAYS.INTL function which allows
control over which days of the week are considered workdays.
Comments
Post a Comment