USE THE DATE FUNCTION TO COMBINE COLUMNS WITH DATE PARTS USING MICROSOFT EXCEL


The Excel worksheet shown in Figure 4-7 uses three columns showing dates. Column A lists years, column B lists months using numbers from 1 to 12, and column C contains the days of a month from 1 to 31. These columns have to be combined to show one formatted date. 

To do so, use the DATE function.

DATE(year, month, day)

year: This argument can be from one to four digits. Microsoft Excel for Windows uses the 1900 date system. 
month: A number representing the month of the year (1 to 12).
day: A number representing the day of the month (1 to 31).

To combine values of cells into one date:

1. Select cells D2:D10 and type the following formula:=DATE(A2,B2,C2).
2. Press <-Ctrl+Enter->.

Note that Excel knows which years are leap years, and thus provides correct results even when incorrect data is entered, as in row 3.

USE THE DATE FUNCTION TO COMBINE COLUMNS WITH DATE PARTS USING MICROSOFT EXCEL

No comments:

Post a Comment