Calculating month in excel

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less

This article describes the formula syntax and usage of the MONTH function in Microsoft Excel.

Description

Returns the month of a date represented by a serial number. The month is given as an integer, ranging from 1 (January) to 12 (December).

Syntax

MONTH(serial_number)

The MONTH function syntax has the following arguments:

  • Serial_number    Required. The date of the month you are trying to find. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.

Remarks

Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.

Values returned by the YEAR, MONTH and DAY functions will be Gregorian values regardless of the display format for the supplied date value. For example, if the display format of the supplied date is Hijri, the returned values for the YEAR, MONTH and DAY functions will be values associated with the equivalent Gregorian date.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Date

15-Apr-11

Formula

Description

Result

=MONTH(A2)

Month of the date in cell A2

4

See Also

DATE function

Add or subtract dates

Date and time functions (reference)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

To find the number of months or days between two dates, type into a new cell: =DATEDIF(A1,B1,”M”) for months or =DATEDIF(A1,B1,”D”) for days.

Contents

  • 1 What is the formula for month in Excel?
  • 2 How do I calculate month and year in Excel?
  • 3 How do I calculate days and months in Excel?
  • 4 How do I convert weeks to months in Excel?
  • 5 How do you calculate beginning of month in Excel?
  • 6 How are days and months calculated?
  • 7 How do you calculate week of month?
  • 8 How do you calculate weeks into months?
  • 9 How do I convert weekly data to monthly in Excel?
  • 10 How do I get the start and end of the month in Excel?
  • 11 How do I calculate month ending date in Excel?
  • 12 What is the Eomonth function in Excel?
  • 13 How do I calculate weeks in Excel?
  • 14 How do I use Isoweeknum in Excel?
  • 15 How do I change the Weeknum in Excel?
  • 16 How do I find the first Monday of the month in Excel?
  • 17 Is 12 weeks and 3 months the same?
  • 18 How many months are in a?
  • 19 How many work weeks are in a month?
  • 20 How do I convert monthly data to quarterly in Excel?

What is the formula for month in Excel?

How to extract month name from date in Excel. In case you want to get a month name rather than a number, you use the TEXT function again, but with a different date code: =TEXT(A2, “mmm”) – returns an abbreviated month name, as Jan – Dec. =TEXT(A2,”mmmm”) – returns a full month name, as January – December.

How do I calculate month and year in Excel?

  1. Click on a blank cell where you want the new date format to be displayed (D2)
  2. Type the formula: =B2 & “-“ & C2. Alternatively, you can type: =MONTH(A2) & “-” & YEAR(A2).
  3. Press the Return key.
  4. This should display the original date in our required format.

How do I calculate days and months in Excel?

Calculate elapsed year, month and days
Select a blank cell which will place the calculated result, enter this formula =DATEDIF(A2,B2,”Y”) & ” Years, ” & DATEDIF(A2,B2,”YM”) & ” Months, ” & DATEDIF(A2,B2,”MD”) & ” Days”, press Enter key to get the result.

How do I convert weeks to months in Excel?

Click the cell that you want to get month and type this formula =CHOOSE(MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(B2,1,3))),”January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”) into it, then press Enter key to get the result, and then drag auto fill to

How do you calculate beginning of month in Excel?

To get the first day of the months, we need to:

  1. Go to cell B2. Click on it with the mouse.
  2. Input the formula =A2-DAY(A2)+1 to the function box in B2.
  3. Press Enter.

How are days and months calculated?

To convert a month measurement to a day measurement, multiply the time by the conversion ratio. The time in days is equal to the months multiplied by 30.436875.

How do you calculate week of month?

Observe the number of weeks in the 12 different months of a year. In order to calculate the number of weeks in a month, we need to count the number of days in the month and divide that number by 7 (1 week = 7 days).

How do you calculate weeks into months?

How to Convert Weeks to Months. To convert a week measurement to a month measurement, multiply the time by the conversion ratio. The time in months is equal to the weeks multiplied by 0.229984.

How do I convert weekly data to monthly in Excel?

7. Click a cell in the date column of the pivot table that Excel created in the spreadsheet. Right-click and select “Group,” then “Days.” Enter “7” in the “Number of days” box to group by week. Click “OK” and verify that you have correctly converted daily data to weekly data.

How do I get the start and end of the month in Excel?

In this example, there is a January start date in cell A2 and a June end date in cell B2. To find the number of dates between the start date and end date, use this formula in cell C2: =B2-A2.

How do I calculate month ending date in Excel?

Use a formula to find the end date of each month may be very easy for every Excel user. Also, you can use this formula =EOMONTH(A2,0) to get the month’s end date. (You need to format the result cells as Date format before entering this formula.)

What is the Eomonth function in Excel?

What is the EOMONTH Function? The EOMONTH Function is categorized under Excel Date/Time functions. This cheat sheet covers 100s of functions that are critical to know as an Excel analyst. The function helps to calculate the last day of the month after adding a specified number of months to a date.

How do I calculate weeks in Excel?

To find out how many weeks there are between two dates, you can use the DATEDIF function with “D” unit to return the difference in days, and then divide the result by 7. Where A2 is the start date and B2 is the end date of the period you are calculating.

How do I use Isoweeknum in Excel?

This article describes the formula syntax and usage of the ISOWEEKNUM function in Microsoft Excel.
Example.

Date
Formula Description Result
=ISOWEEKNUM(A2) Number of the week in the year that 3/9/2012 occurs, based on weeks beginning on the default, Monday (10). 10

How do I change the Weeknum in Excel?

On the other hand, you can also apply the WEEKNUM function to convert a date to corresponding week number. 1. Select a blank cell you will return the week number, enter this formula: =WEEKNUM(B1,1), and press the Enter key.

How do I find the first Monday of the month in Excel?

How to find the first weekday of the month in Excel

  1. =EOMONTH(A1,-1)+1+CHOOSE(WEEKDAY(EOMONTH(A1,-1)+1,2),0,0,0,0,0,2,1) This formula will work with Excel 2007 and later versions.
  2. =EOMONTH(A1,-1)+1.
  3. +CHOOSE(WEEKDAY(EOMONTH(A1,-1)+1,2),0,0,0,0,0,2,1)
  4. =CHOOSE(2,”Oranges”,”Apples”,”Pears”)

Is 12 weeks and 3 months the same?

12 Weeks Pregnant Is How Many Months? At 12 weeks pregnant, you’re about three months pregnant. Remember, pregnancy is 40 weeks long, which doesn’t break down cleanly into nine months.

How many months are in a?

Months

Month Number Month Days in Month
1 January 31
2 February 28 (29 in leap years)
3 March 31
4 April 30

How many work weeks are in a month?

There are about 4.3 weeks per month.

How do I convert monthly data to quarterly in Excel?

If we divide the month by 3 and then round the value up to nearest integer we will get the Quarter. So, A formula like =ROUNDUP(MONTH(B4)/3,0) should tell us the quarter for the month in the cell B4.

Purpose 

Get month as a number (1-12) from a date

Return value 

A number between 1 and 12.

Usage notes 

The MONTH function extracts the month from a given date as a number between 1 to 12. For example, given the date «June 12, 2021», the MONTH function will return 6 for June. MONTH takes just one argument, serial_number, which must be a valid Excel date.

Dates can be supplied to the MONTH function as text (e.g. «13-Aug-2021») or as native Excel dates, which are large serial numbers. To create a date value from scratch with separate year, month, and day inputs, use the DATE function.

The MONTH function will «reset» every 12 months (like a calendar). To work with month durations larger than 12, use a formula to calculate months between dates.

The MONTH function returns a number. If you need the month name, see this example.

Examples

To use the MONTH function, supply a date:

=MONTH("23-Aug-2012") // returns 8
=MONTH("11-May-2019") // returns 5

With the date «September 15, 2017» in cell A1, MONTH returns 9:

=MONTH(A1) // returns 9

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. The formula below extracts the month from the date in cell A1 and uses the TODAY and DATE functions to create a date on the first day of the same month in the current year.

=DATE(YEAR(TODAY(),MONTH(A1),1) // same month current year

See below for more examples of formulas that use the MONTH function.

Note: 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.

Notes

  • MONTH will return #VALUE! if a date is not recognized.
  • MONTH will return #NUM! if a date is supplied as a number that is out of range (i.e. -1).

The MONTH function in Excel is a date function used to find the month for a given date in a date format. This function takes an argument in a date format, and the result is in integer format. This function’s value is in the range of 1-12 as there are only twelve months in a year. The method to use this function is as follows =MONTH( serial_number). The argument provided to this function should be in a recognizable date format of Excel.

For example, =MONTH(A1) – returns the month of a date in A1.

=MONTH(DATE(2020,6,10)) – returns 6 corresponding to June.

Also, =MONTH(“10-June-2020”) – returns number 6 too.

The MONTH function in Excel gives the month from its date. It returns the month number ranging from 1 to 12.

Table of contents
  • MONTH Function in Excel
    • MONTH Formula in Excel
    • MONTH in Excel – Illustration
    • How to Use MONTH Function in Excel?
    • MONTH in Excel Example #1
    • MONTH in Excel Example #2
    • MONTH in Excel Example #3
    • MONTH in Excel Example #4
    • MONTH in Excel Example #5
    • Things to remember about a MONTH in Excel
    • MONTH Excel Function Video
    • Recommended Articles

MONTH Formula in Excel

Below is the MONTH Formula in Excel.

MONTH Formula

Or

MONTH( date )

MONTH in Excel – Illustration

Suppose a date (10 August, 18) is given in cell B3. You want to find the month in Excel of the given date in numbers.

MONTH Illustration -1

You can use the MONTH formula in Excel given below:

= MONTH (B3)

MONTH Illustration - 2

Press the “Enter” key. The MONTH function in Excel will return 8.

MONTH Illustration - 3

You can also use the following MONTH formula in Excel:

= MONTH (“10 Aug 2018”)

MONTH Illustration - 4

Press the “Enter” key. The MONTH function will also return the same value.

MONTH Illustration -5

The date 10 Aug 2018 refers to a value 43322 in Excel. You can also use this value directly as input to the MONTH function. The MONTH formula in Excel would be:

= MONTH (43322)

MONTH Illustration -6

MONTH function in Excel will return 8.

MONTH Illustration - 7

Alternatively, you can also use the date in another format:

= MONTH (“10-Aug-2018”)

MONTH Illustration -8

Excel MONTH function will also return 8.

MONTH Illustration - 9

Let us look at examples of where and how to use the MONTH function in Excel in various scenarios.

How to Use MONTH Function in Excel?

The MONTH function in Excel is very simple and easy to use. Let us understand the working of a MONTH in excel by some examples.

serial_number: a valid date for which the month number is to be identified

The input date must be a valid Excel dateThe date function in excel is a date and time function representing the number provided as arguments in a date and time code. The result displayed is in date format, but the arguments are supplied as integers.read more. The dates in Excel are stored as serial numbers. For example, the date Jan 1, 2010, equals the serial number 40179 in Excel. The MONTH formula in Excel takes as input both the date directly or the serial number of the date. It is to be noted here that Excel does not recognize dates earlier than 1/1/1900.

Returns

The MONTH function in Excel always returns a number ranging from 1 to 12. This number corresponds to the month of the input date.

You can download this MONTH Function Excel Template here – MONTH Function Excel Template

MONTH in Excel Example #1

Suppose you have a list of dates given in the cells B3: B7, as shown below. You want to find the month name of each of these given dates.

MONTH in Excel Example #1

You can do so using the following MONTH formula in Excel:

= CHOOSE ((MONTH(B3)), “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”)

MONTH Example 1-1

MONTH (B3) will return 1.

CHOOSE (1, …..) will choose the 1st option of the given 12, Jan here.

So, the MONTH function in Excel will return Jan as a result.

MONTH Example 1-2

Similarly, you can drag it for the rest of the cells.

MONTH Example 1-3

Alternatively, you can use the following MONTH formula in Excel:

= TEXT (B3, “mmm”)

MONTH Example 1-4

The MONTH function will return Jan as a result.

MONTH Example 1-5

MONTH in Excel Example #2

Suppose you have month names (say in “mmm” format) given in cells B4: B15.

MONTH Example 2

Now, you want to convert these names to the month in numbers.

You can use the following MONTH in Excel:

= MONTH ( DATEVALUE( B4 & ” 1”)

MONTH Example 2-1

MONTH Example 2-2

For Jan, the MONTH in Excel will return 1. For Feb, it will return 2 and so on.

MONTH Example 2-3

MONTH in Excel Example #3

Suppose you have a list of holidays given in cells B3: B9 in a date-wise manner, as shown below.

MONTH Example 3

Now, you want to calculate the number of holidays each month. To do so, you can use the following MONTH formula in Excel for the first month given in E4:

= SUMPRODUCT( –( MONTH( $B$4:$B$16 ) = MONTH( DATEVALUE( E4 & ” 1″)) ) )

MONTH Example 3-1

Then, drag it to the rest of the cells.

Let us look at the MONTH function in Excel detail:

  • MONTH( $B$4:$B$16 ) will check the month of the dates provided in cell range B4:B16 in a number format. The MONTH function in Excel will return {1; 1; 2; 3; 4; 5; 6; 6; 8; 9; 10; 11; 12}
  • MONTH( DATEVALUE( E4 & ” 1″) will give the month in number corresponding to cell E4 (see example 2). The MONTH function in Excel will return 1 for January
  • SUMPRODUCT in ExcelThe SUMPRODUCT excel function multiplies the numbers of two or more arrays and sums up the resulting products.read more (– (…) = (..) ) will match the month given in B4:B16 with January (=1) and will add one each time when it is true.

Since January appears twice in the given data, the MONTH function in Excel will return 2.

MONTH Example 3-2

Similarly, you can do for the rest of the cells.

MONTH Example 3-3

MONTH in Excel Example #4

Suppose you have sales data for the past two years. The data was collected on the last date of the month. The data was manually entered, so there could be a mismatch in the data. You should compare the sales between 2016 and 2017 for each month.

MONTH Example 4

To check if the months are the same and then compare the sales, you can use the MONTH formula in Excel:

=IF( (MONTH(B4)) = (MONTH(D4) ), IF( E4 > C4, “Increase”, “Decrease” ),  “Month-Mismatch” )

MONTH Example 4-1

For the first entry, the MONTH function in Excel will return “Increase.”

MONTH Example 4-2

Let us look at the MONTH in Excel in detail:

If the MONTH of B4 (for 2016) is equal to the MONTH given in D4 (for 2017),

  • The MONTH function in Excel will check if the sales for the given month in 2017 are greater than that in 2016.
    • If it is greater, it will return “Increase.”
    • Else, it will return to “Decrease.”

If the MONTH of B4 (for 2016) is not equal to the MONTH given in D4 (for 2017),

  • The MONTH function in Excel will return “Mismatch.”

Similarly, you can do for the rest of the cells.

MONTH Example 4-3

You could also add another condition to check if the sales are equal and return “Constant.”

MONTH in Excel Example #5

Suppose you work in your company’s sales department and have date-wise data of how many products were sold on a particular date for the previous year, as shown below.

MONTH Example 5

Now, you want to club the number of products monthly. To do so, you use the following MONTH formula in Excel:

= SUMPRODUCT(– ( EXACT( F4, MONTH( $B$4:$B$17 ))), $C$4:$C$17 )

MONTH Example 5-1

For the first cell, the MONTH function in Excel will return 16.

MONTH Example 5-2

Then, drag it to the rest of the cells.

MONTH Example 5-3

Let us look at the MONTH in Excel in detail:

= SUMPRODUCT(– ( EXACT( F4, MONTH( $B$4:$B$17 ))), $C$4:$C$17 )

  • MONTH( $B$4:$B$17 ) will give the month of the cells in B4: B17. MONTH function in Excel will return a matrix {2; 8; 3; 2; 1; 7; 2; 5; 9; 6; 12; 11; 4; 10}
  • EXACT( F4, MONTH( $B$4:$B$17 )) will match the month in F4 ( 1 here) with the matrix and will return another matrix with TRUE when it is a match or FALSE otherwise. For the 1st month, it will return {FALSE; FALSE; FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE; FALSE; FALSE; FALSE; FALSE; FALSE}
  • SUMPRODUCT (– (..), $C$4:$C$17) will sum the values in C4:C17 when the corresponding value in the matrix is “TRUE.”

The MONTH function in Excel will return 16 for January.

MONTH Example 5-4

Things to remember about a MONTH in Excel

  • The MONTH function returns the month of the given date or serial number.
  • Excel MONTH function is given #VALUE! Error when it cannot recognize the date.
  • The Excel MONTH function accepts dates only after 1 Jan 1900. It will provide the #VALUE! Error when the input date is earlier than 1 Jan 1900.
  • The MONTH function in Excel returns the month in number format only. Therefore, its output is always a number between 1 and 12.

MONTH Excel Function Video

Recommended Articles

This article is a guide to MONTH Function in Excel. We discuss the MONTH formula in Excel and how to use the MONTH function, along with Excel examples and downloadable Excel templates. You may also look at these useful functions in Excel: –

  • EDATE Function in ExcelEDATE is a date and time function in excel which adds a given number of months into a date and gives us a date in a numerical format of date. It takes dates and integers as input, the output returned by this function is also a date value. read more
  • VBA MONTH VBA Month Function is an inbuilt function that is used to extract the month from a date. The output of this function is an integer ranging from 1 to 12. Only the month number is extracted from the supplied date value by this function.read more
  • EOMONTH in ExcelEOMONTH is a worksheet date function in excel which calculates the end of the month for the given date by adding a specified number of months to the arguments. This function takes two arguments: the date and another as integer, and the output is in the date format.read more
  • FREQUENCY Excel FunctionThe FREQUENCY function in Excel calculates the number of times a data values occurs within a given range of values and returns a vertical array of numbers corresponding to each value’s frequency within a range.read more

If you manage multiple projects, you would have a need to know how many months have passed between two dates. Or, if you’re in the planning phase, you may need to know the same for the start and end date of a project.

There are multiple ways to calculate the number of months between two dates (all using different formulas).

In this tutorial, I will give you some formulas that you can use to get the number of months between two dates.

So let’s get started!

Using DATEDIF Function (Get Number of Completed Months Between Two Dates)

It’s unlikely that you will get the dates that have a perfect number of months. It’s more likely to be some number of months and some days that are covered by the two dates.

For example, between 1 Jan 2020 and 15 March 2020, there are 2 months and 15 days.

If you only want to calculate the total number of months between two dates, you can use the DATEDIF function.

Suppose you have a dataset as shown below where you only want to get the total number of months (and not the days).

Data to calculate months between two dates

Below is the DATEDIF formula that will do that:

=DATEDIF(A2,B2,"M")

DATEDIF formula to get number of month between dates

The above formula will give you only the total number of completed months between two dates.

DATEDIF is one of the few undocumented functions in Excel. When you type the =DATEDIF in a cell in Excel, you would not see any IntelliSense or any guidance on what arguments it can take. So, if you’re using DATEDIF in Excel, you need to know the syntax.

In case you want to get the total number of months as well as days between two dates, you can use the below formula:

=DATEDIF(A2,B2,"M")&"M "&DATEDIF(A2,B2,"MD")&"D"

Use DATEDIF to get month number as well as the days numbers between dates

Note: DATEDIF function will exclude the start date when counting the month numbers. For example, if you start a project on 01 Jan and it ends on 31 Jan, the DATEDIF function will give the number of months as 0 (as it doesn’t count the start date and according to it only 30 days in January have been covered)

Using YEARFRAC Function (Get Total Months Between Two Dates)

Another method to get the number of months between two specified dates is by using the YEARFRAC function.

The YEARFRAC function will take a start date and end date as input arguments and it will give you the number of years that have passed during these two dates.

Unlike the DATEDIF function, the YEARFRAC function will give you the values in decimal in case a year has not elapsed between the two dates.

For example, if my start date is 01 Jan 2020 and end date is 31 Jan 2o20, the result of the YEARFRAC function will be 0.833. Once you have the year value, you can get the month value by multiplying this with 12.

Suppose you have the dataset as shown below and you want to get the number of months between the start and end date.

Data to calculate months between two dates

Below is the formula that will do this:

=YEARFRAC(A2,B2)*12

This will give you the months in decimals.

YEARFRAC function to get number of month in decimal

In case you only want to get the number of complete months, you can wrap the above formula in INT (as shown below):

=INT(YEARFRAC(A2,B2)*12)

Another major difference between the DATEDIF function and YEARFRAC function is that the YEARFRAC function will consider the start date as a part of the month. For example, if the start date is 01 Jan and end date is 31 Jan, the result from the above formula would be 1

Below is a comparison of the results you get from DATEDIF and YEARFRAC.

Difference between YEARFRAC and DATEDIF function

Using the YEAR and MONTH Formula (Count All Months when the Project was Active)

If you want to know the total months that are covered between the start and end date, then you can use this method.

Suppose you have the dataset as shown below:

Data to calculate months between two dates

Below is the formula that will give you the number of months between the two dates:

=(YEAR(B2)-YEAR(A2))*12+MONTH(B2)-MONTH(A2)

using YEAR and MONTH formula to get the month count

This formula uses the YEAR function (which gives you the year number using the date) and the MONTH function (which gives you the month number using the date).

The above formula also completely ignores the month of the start date.

For example, if your project starts on 01 Jan and ends on 20 Feb, the formula shown below will give you the result as 1, as it completely ignores the start date month.

In case you want it to count the month of the start date as well, you can use the below formula:

=(YEAR(B2)-YEAR(A2))*12+(MONTH(B2)-MONTH(A2)+1)

You may want to use the above formula when you want to know-how in how many months was this project active (which means that it could count the month even if the project was active for only 2 days in the month).

So these are three different ways to calculate months between two dates in Excel. The method you choose would be based on what you intend to calculate (below is a quick summary):

  • Use the DATEDIF function method if you want to get the total number of completed months in between two dates (it ignores the start date)
  • Use the YEARFRAC method when you want to get the actual value of months elapsed between tow dates. It also gives the result in decimal (where the integer value represents the number of full months and decimal part represents the number of days)
  • Use the YEAR and MONTH method when you want to know how many months are covered in between two dates (even when the duration between the start and the end date is only a few days)

Below is how each formula covered in this tutorial will count the number of months between two dates:

Difference between YEARFRAC and DATEDIF and YEAR & MONTH function

Hope you found this Excel tutorial useful.

You may also like the following Excel tips and tutorials:

  • How to Calculate the Number of Days Between Two Dates in Excel
  • How to Remove Time from Date/Timestamp in Excel
  • Convert Time to Decimal Number in Excel (Hours, Minutes, Seconds)
  • How to Quickly Insert Date and Timestamp in Excel
  • Convert Date to Text in Excel
  • How to SUM values between two dates in Excel
  • How to Add Months to Date in Excel
  • How to Calculate Years of Service in Excel (Easy Formulas)
  • How to Make an Interactive Calendar in Excel? (FREE Template)
Date yes Add (Subtract) Days to a Date Concatenate Dates Convert Date to Number Convert Date to Text Month Name to Number Create Date Range from Dates Day Number of Year Month Name from Date First Day of Month Add (Subtract) Weeks to a Date If Functions with Dates Max Date Number of Days Between Dates Number of Days in a Month Number of Weeks Between Dates Number of Years Between Dates Split Date & Time into Separate Cells Countdown Remaining Days Insert Dates Random Date Generator Using Dynamic Ranges — Year to Date Values Add (Subtract) Years to a Date Date Formula Examples Extract Day from Date Get Day Name from Date Count Days Left in Month / Year Count Workdays Left in Month / Year Get Last Day of Month Last Business Day of Month / Year Number of Work / Business Days in Month Weekday Abbreviations Auto Populate Dates Number of Months Between Dates Quarter from a Date Years of Service Change Date Format Compare Dates Time yes Add (Subtract) Hours to Time Add (Subtract) Minutes to Time Add (Subtract) Seconds to Time Add Up time (Total Time) Time Differences Change Time Format Convert Minutes to Hours Convert Time to Decimal Convert Time to Hours Convert Time to Minutes Convert Time to Seconds Military Time Round Time to Nearest 15 Minutes Overtime Calculator Number of Hours Between Times Convert Seconds to Minutes, Hours, or Time Count Hours Worked Time Differences Time Format — Show Minutes Seconds Text yes Add Commas to Cells Get First Word from Text Capitalize First Letter Clean & Format Phone #s Remove Extra Trailing / Leading Spaces Add Spaces to Cell Assign Number Value to Text Combine Cells with Comma Combine First and Last Names Convert Text String to Date Convert Text to Number Extract Text From Cell Get Last Word Remove Unwated Characters Extract Text Before or After Character How to Split Text String by Space, Comma, & More Remove Special Characters Remove First Characters from Left Substitute Multiple Values Switch First & Last Names w/ Commas Remove Specific Text from a Cell Extract Text Between Characters (Ex. Parenthesis) Add Leading Zeros to a Number Remove Line Breaks from Text Remove all Numbers from Text Reverse Text Remove Non-Numeric Characters Remove Last Character(s) From Right Separate First and Last Names Separate Text & Numbers Round yes Round Formulas Round Price to Nearest Dollar or Cent Round to Nearest 10, 100, or 1000 Round to Nearest 5 or .5 Round Percentages Round to Significant Figures Count yes Count Blank and Non-blank Cells Count Cells Between Two Numbers Count Cells not Equal to Count if Cells are in Range Count Times Word Appears in Cell Count Words in Cell Count Specific Characters in Column Count Total Number of Characters in Column Count Cells that Equal one of two Results Count Cells that do not Contain Count Cells that Contain Specific Text Count Unique Values in Range Countif — Multiple Criteria Count Total Number of Cells in Range Count Cells with Any Text Count Total Cells in a Table Lookup yes Two Dimensional VLOOKUP VLOOKUP Simple Example Vlookup — Multiple Matches Case Sensitive Lookup Case Sensitive VLOOKUP Sum if — VLOOKUP Case Sensitive Lookup Case Sensitive VLOOKUP Find Duplicates w/ VLOOKUP or MATCH INDEX MATCH MATCH Lookup — Return Cell Address (Not Value) Lookup Last Value in Column or Row Reverse VLOOKUP (Right to Left) Risk Score Bucket with VLOOKUP Sum with a VLOOKUP Function VLOOKUP & INDIRECT VLOOKUP Concatenate VLOOKUP Contains (Partial Match) 17 Reasons Why Your XLOOKUP is Not Working Double (Nested) XLOOKUP — Dynamic Columns IFERROR (& IFNA) XLOOKUP Lookup Min / Max Value Nested VLOOKUP Top 11 Alternatives to VLOOKUP (Updated 2022!) VLOOKUP – Dynamic Column Reference VLOOKUP – Fix #N/A Error VLOOKUP – Multiple Sheets at Once VLOOKUP & HLOOKUP Combined VLOOKUP & MATCH Combined VLOOKUP Between Worksheets or Spreadsheets VLOOKUP Duplicate Values VLOOKUP Letter Grades VLOOKUP Return Multiple Columns VLOOKUP Returns 0? Return Blank Instead VLOOKUP w/o #N/A Error XLOOKUP Multiple Sheets at Once XLOOKUP Between Worksheets or Spreadsheets XLOOKUP by Date XLOOKUP Duplicate Values XLOOKUP Multiple Criteria XLOOKUP Return Multiple Columns XLOOKUP Returns 0? Return Blank Instead XLOOKUP Text XLOOKUP with IF XLOOKUP With If Statement Misc. yes Sort Multiple Columns Use Cell Value in Formula Percentage Change Between Numbers Percentage Breakdown Rank Values Add Spaces to Cell CAGR Formula Average Time Decimal Part of Number Integer Part of a Number Compare Items in a List Dealing with NA() Errors Get Worksheet Name Wildcard Characters Hyperlink to Current Folder Compound Interest Formula Percentage Increase Create Random Groups Sort with the Small and Large Functions Non-volatile Function Alternatives Decrease a Number by a Percentage Calculate Percent Variance Profit Margin Calculator Convert Column Number to Letter Get Full Address of Named Range Insert File Name Insert Path Latitute / Longitude Functions Replace Negative Values Reverse List Range Convert State Name to Abbreviation Create Dynamic Hyperlinks Custom Sort List with Formula Data Validation — Custom Formulas Dynamic Sheet Reference (INDIRECT) Reference Cell in Another Sheet or Workbook Get Cell Value by Address Get Worksheet Name Increment Cell Reference List Sheet Names List Skipped Numbers in Sequence Return Address of Max Value in Range Search by Keywords Select Every Other (or Every nth) Row Basics yes Cell Reference Basics — A1, R1C1, 3d, etc. Add Up (Sum) Entire Column or Row Into to Dynamic Array Formulas Conversions yes Convert Time Zones Convert Celsius to Fahrenheit Convert Pounds to Kilograms Convert Time to Unix Time Convert Feet to Meters Convert Centimeters to Inches Convert Kilometers to Miles Convert Inches to Feet Convert Date to Julian Format Convert Column Letter to Number Tests yes Test if a Range Contains any Text Test if any Cell in Range is Number Test if a Cell Contains a Specific Value Test if Cell Contains Any Number Test if Cell Contains Specific Number Test if Cell is Number or Text If yes Percentile If Subtotal If Sumproduct If Large If and Small If Median If Concatentate If Max If Rank If TEXTJOIN If Sum yes Sum if — Begins With / Ends With Sum if — Month or Year to Date Sum if — By Year Sum if — Blank / Non-Blank Sum if — Horizontal Sum Count / Sum If — Cell Color INDIRECT Sum Sum If — Across Multiple Sheets Sum If — By Month Sum If — Cells Not Equal To Sum If — Not Blank Sum if — Between Values Sum If — Week Number Sum Text Sum if — By Category or Group Sum if — Cell Contains Specific Text (Wildcards) Sum if — Date Rnage Sum if — Dates Equal Sum if — Day of Week Sum if — Greater Than Sum if — Less Than Average yes Average Non-Zero Values Average If — Not Blank Average — Ignore 0 Average — Ignore Errors Math yes Multiplication Table Cube Roots nth Roots Square Numbers Square Roots Calculations yes Calculate a Ratio Calculate Age KILLLLLLL Calculate Loan Payments GPA Formula Calculate VAT Tax How to Grade Formulas Find yes Find a Number in a Column / Workbook Find Most Frequent Numbers Find Smallest n Values Find nth Occurance of Character in Text Find and Extract Number from String Find Earliest or Latest Date Based on Criteria Find First Cell with Any Value Find Last Row Find Last Row with Data Find Missing Values Find Largest n Values Most Frequent Number Conditional Formatting yes Conditional Format — Dates & Times Conditional Format — Highlight Blank Cells New Functions XLOOKUP Replaces VLOOKUP, HLOOKUP, and INDEX / MATCH Logical yes AND Checks whether all conditions are met. TRUE/FALSE IF If condition is met, do something, if not, do something else. IFERROR If result is an error then do something else. NOT Changes TRUE to FALSE and FALSE to TRUE. OR Checks whether any conditions are met. TRUE/FALSE XOR Checks whether one and only one condition is met. TRUE/FALSE Lookup & Reference yes FALSE The logical value: FALSE. TRUE The logical value: TRUE. ADDRESS Returns a cell address as text. AREAS Returns the number of areas in a reference. CHOOSE Chooses a value from a list based on it’s position number. COLUMN Returns the column number of a cell reference. COLUMNS Returns the number of columns in an array. HLOOKUP Lookup a value in the first row and return a value. HYPERLINK Creates a clickable link. INDEX Returns a value based on it’s column and row numbers. INDIRECT Creates a cell reference from text. LOOKUP Looks up values either horizontally or vertically. MATCH Searches for a value in a list and returns its position. OFFSET Creates a reference offset from a starting point. ROW Returns the row number of a cell reference. ROWS Returns the number of rows in an array. TRANSPOSE Flips the oriention of a range of cells. VLOOKUP Lookup a value in the first column and return a value. Date & Time yes DATE Returns a date from year, month, and day. DATEDIF Number of days, months or years between two dates. DATEVALUE Converts a date stored as text into a valid date DAY Returns the day as a number (1-31). DAYS Returns the number of days between two dates. DAYS360 Returns days between 2 dates in a 360 day year. EDATE Returns a date, n months away from a start date. EOMONTH Returns the last day of the month, n months away date. HOUR Returns the hour as a number (0-23). MINUTE Returns the minute as a number (0-59). MONTH Returns the month as a number (1-12). NETWORKDAYS Number of working days between 2 dates. NETWORKDAYS.INTL Working days between 2 dates, custom weekends. NOW Returns the current date and time. SECOND Returns the second as a number (0-59) TIME Returns the time from a hour, minute, and second. TIMEVALUE Converts a time stored as text into a valid time. TODAY Returns the current date. WEEKDAY Returns the day of the week as a number (1-7). WEEKNUM Returns the week number in a year (1-52). WORKDAY The date n working days from a date. WORKDAY.INTL The date n working days from a date, custom weekends. YEAR Returns the year. YEARFRAC Returns the fraction of a year between 2 dates. Engineering yes CONVERT Convert number from one unit to another. Financial yes FV Calculates the future value. PV Calculates the present value. NPER Calculates the total number of payment periods. PMT Calculates the payment amount. RATE Calculates the interest Rate. NPV Calculates the net present value. IRR The internal rate of return for a set of periodic CFs. XIRR The internal rate of return for a set of non-periodic CFs. PRICE Calculates the price of a bond. YIELD Calculates the bond yield. INTRATE The interest rate of a fully invested security. Information yes CELL Returns information about a cell. ERROR.TYPE Returns a value representing the cell error. ISBLANK Test if cell is blank. TRUE/FALSE ISERR Test if cell value is an error, ignores #N/A. TRUE/FALSE ISERROR Test if cell value is an error. TRUE/FALSE ISEVEN Test if cell value is even. TRUE/FALSE ISFORMULA Test if cell is a formula. TRUE/FALSE ISLOGICAL Test if cell is logical (TRUE or FALSE). TRUE/FALSE ISNA Test if cell value is #N/A. TRUE/FALSE ISNONTEXT Test if cell is not text (blank cells are not text). TRUE/FALSE ISNUMBER Test if cell is a number. TRUE/FALSE ISODD Test if cell value is odd. TRUE/FALSE ISREF Test if cell value is a reference. TRUE/FALSE ISTEXT Test if cell is text. TRUE/FALSE N Converts a value to a number. NA Returns the error: #N/A. TYPE Returns the type of value in a cell. Math yes ABS Calculates the absolute value of a number. AGGREGATE Define and perform calculations for a database or a list. CEILING Rounds a number up, to the nearest specified multiple. COS Returns the cosine of an angle. DEGREES Converts radians to degrees. DSUM Sums database records that meet certain criteria. EVEN Rounds to the nearest even integer. EXP Calculates the exponential value for a given number. FACT Returns the factorial. FLOOR Rounds a number down, to the nearest specified multiple. GCD Returns the greatest common divisor. INT Rounds a number down to the nearest integer. LCM Returns the least common multiple. LN Returns the natural logarithm of a number. LOG Returns the logarithm of a number to a specified base. LOG10 Returns the base-10 logarithm of a number. MOD Returns the remainder after dividing. MROUND Rounds a number to a specified multiple. ODD Rounds to the nearest odd integer. PI The value of PI. POWER Calculates a number raised to a power. PRODUCT Multiplies an array of numbers. QUOTIENT Returns the integer result of division. RADIANS Converts an angle into radians. RAND Calculates a random number between 0 and 1. RANDBETWEEN Calculates a random number between two numbers. ROUND Rounds a number to a specified number of digits. ROUNDDOWN Rounds a number down (towards zero). ROUNDUP Rounds a number up (away from zero). SIGN Returns the sign of a number. SIN Returns the sine of an angle. SQRT Calculates the square root of a number. SUBTOTAL Returns a summary statistic for a series of data. SUM Adds numbers together. SUMIF Sums numbers that meet a criteria. SUMIFS Sums numbers that meet multiple criteria. SUMPRODUCT Multiplies arrays of numbers and sums the resultant array. TAN Returns the tangent of an angle. TRUNC Truncates a number to a specific number of digits. Stats yes AVERAGE Averages numbers. AVERAGEA Averages numbers. Includes text & FALSE =0, TRUE =1. AVERAGEIF Averages numbers that meet a criteria. AVERAGEIFS Averages numbers that meet multiple criteria. CORREL Calculates the correlation of two series. COUNT Counts cells that contain a number. COUNTA Count cells that are non-blank. COUNTBLANK Counts cells that are blank. COUNTIF Counts cells that meet a criteria. COUNTIFS Counts cells that meet multiple criteria. FORECAST Predict future y-values from linear trend line. FREQUENCY Counts values that fall within specified ranges. GROWTH Calculates Y values based on exponential growth. INTERCEPT Calculates the Y intercept for a best-fit line. LARGE Returns the kth largest value. LINEST Returns statistics about a trendline. MAX Returns the largest number. MEDIAN Returns the median number. MIN Returns the smallest number. MODE Returns the most common number. PERCENTILE Returns the kth percentile. PERCENTILE.INC Returns the kth percentile. Where k is inclusive. PERCENTILE.EXC Returns the kth percentile. Where k is exclusive. QUARTILE Returns the specified quartile value. QUARTILE.INC Returns the specified quartile value. Inclusive. QUARTILE.EXC Returns the specified quartile value. Exclusive. RANK Rank of a number within a series. RANK.AVG Rank of a number within a series. Averages. RANK.EQ Rank of a number within a series. Top Rank. SLOPE Calculates the slope from linear regression. SMALL Returns the kth smallest value. STDEV Calculates the standard deviation. STDEV.P Calculates the SD of an entire population. STDEV.S Calculates the SD of a sample. STDEVP Calculates the SD of an entire population TREND Calculates Y values based on a trendline. Text yes CHAR Returns a character specified by a code. CLEAN Removes all non-printable characters. CODE Returns the numeric code for a character. CONCATENATE Combines text together. DOLLAR Converts a number to text in currency format. EXACT Test if cells are exactly equal. Case-sensitive. TRUE/FALSE FIND Locates position of text within a cell.Case-sensitive. LEFT Truncates text a number of characters from the left. LEN Counts number of characters in text. LOWER Converts text to lower case. MID Extracts text from the middle of a cell. PROPER Converts text to proper case. REPLACE Replaces text based on it’s location. REPT Repeats text a number of times. RIGHT Truncates text a number of characters from the right. SEARCH Locates position of text within a cell.Not Case-sensitive. SUBSTITUTE Finds and replaces text. Case-sensitive. TEXT Converts a value into text with a specific number format. TRIM Removes all extra spaces from text. UPPER Converts text to upper case. VALUE Converts a number stored as text into a number.

MONTH Function in Excel

Excel MONTH Function (Table of Contents)

  • MONTH in Excel
  • MONTH Formula in Excel
  • How to Use MONTH Function in Excel?

MONTH in Excel

The month function in excel is one of the simplest functions to understand, which only returns a month out of any selected dates. We can either enter the select the cell containing a date or enter to the month number we want to see. But using the Month function by selecting any date and getting the month number out of that is the best way to use it.

MONTH Formula in Excel:

The Formula for the MONTH Function in Excel is as follows.

MONTH Formula

The MONTH function uses only one argument where the serial number argument is the date that you want to return the month.

NOTE: It is recommended that dates should be supplied to Excel functions as either, Serial numbers or Reference to cells containing dates or Date values returned from other Excel formulas.

DAY Formula in Excel:

The Formula for the DAY Function in Excel is as follows.

DAY Formula

Arguments :

date_value/ Serial_number: A valid date to return the day.

Returns:

The DAY function returns a numeric value between 1 and 31.

YEAR Formula in Excel:

The Formula for the YEAR Function in Excel is as follows.

YEAR Formula

Arguments:

date_value/Serial_number: A valid date to return the month.

Returns:

The YEAR function returns a numeric value between 1999 and 9999.

Steps to Use Month Function in Excel

MONTH Function in Excel can be used as part of a formula in a cell of a worksheet. Let’s consider the below example for good understanding. We cannot enter 10/05/2018 directly into the cell. Instead,d we need to enter “10/05/2018”. Excel will automatically convert dates stored in cells into serial format unless the date is entered in text.

After entering into the cell, the formula input appears below; the cell is shown below for reference. We can use the shortcut “Insert Function Dialog Box” for detailed instructions:

MONTH step 1

We will get a below dialogue box to select the specific cell where we have given Month Date Year.

MONTH step 2

Select the B2 Cell.

MONTH step 3

Give ok so that we will get the exact month value.

MONTH step 4

Result:

MONTH step Result

Using Choose & Today Function

Using the month function, we can use the choose & Today function to get the exact month name, wherein the above example shows we have used only the MONTH function to get the month value. In the below example, we have used the month function along with CHOOSE and TODAY.

Choose & Today Function

This dynamic formula will return the name of the month instead of the month number.

Result of Choose & Today Function

How to Use MONTH Function in Excel?

MONTH Function in excel is very simple easy to use. Let us now see how to use the MONTH Function in Excel with the help of some examples.

You can download this MONTH Function Excel Template here – MONTH Function Excel Template

Example #1

To find out today month, we can use the below formula:

=MONTH(TODAY())

MONTH Example 1

Which will return the current today month.

Result of Example 1

Let see to extract the month value with the below example

Example #2

MONTH Example 2

In the above example, we have retrieved the exact month by using the Month function to get the month name.

Result of Example 2

Example #3

In certain scenarios, we can see Year, a month, and a day will be given. In this case, we cannot use the MONTH function. To get an accurate result, we can use the Month Function along with the date function.

Date Function:

Formula:

DATE( year, month, day )

where the year, month, and day arguments are integers representing the year, month, and day of the required date.

In the below example, we have used the Month Function and the date function to get the proper result.

MONTH Example 3.1

The Result will be:

Result of Example 3

Using the End of Month Function in Excel

If we need to find out the end of the month, EOMONTH can be useful to find out exactly.

To calculate the last day of a month based on a given date, you can use the EOMONTH function. Let’s see the below example works.

MONTH Example 3.3

So in the above example, we can see A1 columns, which have a day, Month & Year, and B1 Columns, showing the Last day of the month using the EOMONTH function.

MONTH Example 3.4

We can drag the formula by using Ctrl + D or double click on the right corner of the cell B2.

Result of Example 4

In this way, we can easily extract the end of the month without using a calendar.

How EOMONTH Formula Works?

This EOMONTH Function allows you to get the last day of the month in the future or past month. If we use Zero(o) for months, EOMONTH will return the last day of the month in the same month, which we have seen in the above example. To get the last day of the prior month, we can use the below formula to execute:

Formula:

=EOMONTH(date,-1)

To get the last day of the next month, we can use the below formula to execute:

Formula:

=EOMONTH(date,1)

Alternatively, we can use the Date, Year and Month function to return the last day of the Month.

Formula:

=DATE(YEAR(date),MONTH(date)+1,0)

So in the above example, we can see various months in the A1 columns, and B1 shows the Last day of the month.

In this way, we can easily extract the end of the month without using a calendar.

Date Function Arguments

The excel date function is a built-in function in excel that will come under the Date/Time Function, where it returns the serial date value for a date.

A formula for DATE Function:

=DATE( year, month, day )

Arguments:

Year: A a number that is between 1 and 4 digits that represent the year.

Month: This represents month value; if the month value is greater than 12, then every 12 months will add1 one year to the year value.

Day: This represents day Value. If the day value is greater than the number of days, then the exact number of months will be added to the month value.

Example

If we enter the date by default, excel will take as a general format which is shown below:

MONTH Example 3.6

It will take as a general format which is shown below:

MONTH Example 3.7

So in order to get the exact date to be displayed, we have to choose the format cells, and then we need to choose the day, month & year format.

MONTH Example 3.8

In the above example, we have formatted the cell to get the appropriate date, month & year.

Common Errors We will Face While Using Month Function in Excel:

If we normally enter the date in the cell by default, excel will take an integer value because of “General format”.

MONTH Common Error

So whenever we wish to update the date in the cell, we need to format the cell and choose the appropriate date, month and Year format.

Things to Remember

  • The Date from which you want to get the month number should be a valid date.
  • If you mention an invalid date, it will return #VALUE! error.
  • if you skip entering any value in serial_number, it will return.

Recommended Articles

This has been a guide to MONTH in Excel. Here we discuss the MONTH Formula in Excel and how to use MONTH Function in Excel along with excel examples and downloadable excel templates. You may also look at these useful functions in excel –

  1. VBA Month
  2. Excel DATEDIF Function
  3. Excel Add Months to Dates
  4. WEEKDAY Formula in Excel

How to plus or minus exactly one month in Excel?

The best way is to use a built in function in the analysis toolpack, edate.

=edate([date], [months])

Date is the date you are calculating from. Months is how many months you want to add. If you want to go backwards, then months is a negative number. So, 1 months later, put 1; 4 months ago, put -4.

Unfortunately, as much as it seems intuitive, using the date function does not work as intended.

=date(year([date]), month([date])+1, day([date]))

The problem is if the month doesn’t have a certain day, the calculation gets extended into the next month. For example, the formula below returns March 2, 2011 instead of the intended February 28, 2011.

=date(year(DATE(2011,1,1)), month(DATE(2011,1,1))+1, day(DATE(2011,1,1)))

How to get the last day of the month in Excel?

Easiest way, once again, is to use a built in funciton in the analyst toolpack, eomonth.

=edate([date], [months])

The function takes the date provided and uses the second parameter to determine the number of months future or past that should be calculated. So, if you want the last day of the current month:

=edate(now(), 0)

Similar to above, to count backwards, negative numbers for months.

  0 people found this article useful

  0 people found this article useful

Excel spreadsheets provide the ability to work with various types of textual and numerical information. Date processing is also available. In this case, there may be a need to extract from the general meaning of a specific number, for example, a year. There are separate functions for this: YEAR, MONTH, DAY and DAY.



Examples of using functions for date processing in Excel

Excel tables store dates that are presented as a sequence of numeric values. It begins on January 1, 1900. This date will correspond to the number 1. At the same time, January 1, 2009 is laid down in the tables, as the number 39813. This is the number of days between the two designated dates.

The function YEAR is used similarly to the adjacent:

  • MONTH;
  • DAY;
  • WEEKDAY.

All of them display numerical values corresponding to the Gregorian calendar. Even if in the Excel spreadsheet, the Hijra calendar was chosen to display the entered date, then when isolating the year and other composite values by functions, the application will present a number that is equivalent to the Gregorian system of chronology.

To use the YEAR function, you need to enter into the cell the following function formula with one argument:

=YEAR(cell address with date in numeric format)

The function argument is required. It can be replaced by «date_number_number». In the examples below, you can clearly see this. It is important to remember that when displaying the date as text (automatic orientation on the left edge of the cell), the YEAR function will not be executed. Its result will be the # SIGN. Therefore, formatted dates must be presented in a numerical version. Days, months and year can be separated by a dot, slash or comma.

Consider an example of working with the YEAR function in Excel. If we need to get a year from the original date, the function AVAILABLE will not help us since it does not work with dates, but only with text and numeric values. To separate the year, month or day from the full date for this, Excel provides functions for working with dates.

Example: There is a table with a list of dates and in each of them it is necessary to separate the value of only the year.

We introduce the original data in Excel.

Example 1.

To solve the problem, it is necessary to enter the formula in the cells of column B:

=YEAR(the address of the cell, from the date of which you need to isolate the year value)

YEAR function.

As a result, we extract years from each date.

A similar example of the MONTH function in Excel:

MONTH function.

An example of working with functions DAY and WEEKDAY. The DAY function gets to calculate from the date the number of any day:

DAY.

WEEKDAY function returns the number of the day of the week (1-Monday, 2-Tuesday …, etc.) for any date:

WEEKDAY.

In the second optional argument of the WEEKDAY function, the number 2 may specified for our day of the week countdown format (Monday-1 through Sunday-7):

 number 2 may specified for our day.

If you omit the second optional argument, then the default format will be used (English from Sunday-1 to Saturday-7).

Create a formula of the combination of the functions INDEX and WEEKDAY:

functions INDEX and WEEKDAY.

We obtain a more understandable form of the implementation of this function.



Examples of the practical use of functions for working with dates

These primitive functions are very useful when grouping data by: years, months, days of the week, and specific days.

Suppose we have a simple sales report:

Example 2.

We need to quickly organize data for visual analysis without using pivot tables. To do this, we will bring the report into a table where it is convenient and quickly to group data by year, month and day of the week:

pivot tables.

Now we have a tool to work with this sales report. We can filter and segment data by specific time criteria:

sales report 2017.

In addition, you can make a histogram to analyze the best-selling days of the week, to understand which day of the week has the largest number of sales:

the best-selling days.

In this form, it is very convenient to segment sales reports for long, medium and short periods of time.

It should be immediately noted that in order to get the difference between the two dates, none of the above functions will help us. For this task, you should use a specially designed function DATEDIF:

DATEDIF.

Download examples fo functions YEAR MONTH DAY WEEKDAY and DATEDIF

The type of values in the date cells requires a special approach to data processing. Therefore, you should use the appropriate type of function in Excel.

Понравилась статья? Поделить с друзьями:
  • Can cant word wall
  • Can but be the first word of a sentence
  • Can break links in excel
  • Can be opened in ms word
  • Can asians say the n word