Simple and detailed guide on how to use the DAY function in Excel with easy-to-understand examples

The DAY function in Excel is a commonly used tool for analyzing date data: day, month, year. If you are unfamiliar with how to use the DAY function, don't overlook the detailed instructions in this article!

0
147

The DAY function in Excel is a basic function, but many people still don’t know how to use it. When you understand how to implement the DAY function, all operations in Excel become much simpler, faster, and more professional. Let’s explore how to use it right away!

What is the DAY function? The formula of the DAY function in Excel

The DAY function in Excel is a date function that falls under the date and time function group. In fact, this function can be combined with many different function groups to create suitable calculation formulas for your work needs.

To display the function content accurately in the cell reference of the worksheet, you enter =DAY (Serial_number). Where:

  • Serial_number is the date value
  • The value returned by the DAY function is between 1 and 31.

How to use the DAY function in Excel

To easily imagine how to use the DAY function on the spreadsheet, let’s explore some examples from basic to advanced below!

1. Use the DAY function to extract the day

  • Step 1: First, you open the Excel worksheet that you want to use the function. Then, at the cell where you want to display the result content (C3), you enter =DAY (B3) 

  • Step 2: Finally, you press the Enter key to display the result.

Note: You can change the date format on your computer by going to the Home tab, selecting the Number group, and then selecting the General format.

2. Use the DAY function combined with the DATEDIF function

Step 1: To start the operation, first, you open the existing Excel spreadsheet. In the spreadsheet, you enter the function =DATEDIF(B3,C3,”D”) into the cell where you want to display the result (C7). Where:

  • B3 is the start time
  • C3 is the end time
  • “D” is the symbol of the day you want to take from the date, month, year value.

You can change “D” to “M” (if you count by month) or “Y” (when you count by year). At this time, the number displayed in the calculated cell is the number of months/years you want.

Step 2: Finally, to end the operation, you press Enter to display the result on the screen.

3. Use the DAY function in Excel to find the date

Find the first day of the month

In addition to the usual uses, the DAY function is also used to find the first day of the month in Excel. The specific formula is: =B3-DAY(B3)+1. Where, B3 is the content referring to the cell containing the date data.

Find the exact date after n years

Suppose you need to find the exact result of the day, month, year with a year difference of “Time (years)” calculated from the “Original data”. The formula used is as follows: =DATE(YEAR(B3)+C3,MONTH(B3),DAY(B3))

Where:

  • The YEAR function is used to determine the desired year (equal to the year value at cell B3 plus the number of years at cell C3).
  • The MONTH function is used to determine the desired month (equal to the month value at cell B3).
  • The DAY function is used to determine the desired day (equal to the day value at cell B3).

Combine the results of the YEAR, MONTH, and DAY functions, you will get the final result in the corresponding date format.

Common errors when using the DAY function in Excel

During the use of the DAY function, you will inevitably encounter and make some mistakes. Here are 2 common errors, their causes, and how to fix them.

Error #NAME!

  • Cause: Your function has a value error, incorrect syntax (letters or characters) that makes the worksheet unable to recognize the function.
  • How to fix: You need to check and correct the calculation formula according to the required syntax.

Error #VALUE

  • Cause: You will encounter this error when entering the wrong regulations regarding the date, month, year
  • How to fix: Similar to the previous error, you should check the content format and re-enter it correctly.

Conclusion

You will easily understand the DAY function in Excel if you are proficient in syntax, formulas, and their usage. If you have any questions that need answering, please leave a comment below and don’t forget to share if you find the information FPT Shop shares useful! In addition, you can also refer to some suitable laptops for office workers to perform tasks and operations on Word, Excel,… effectively.