These Excel formulas are pretty self explanatory, but for the sake of explaining it with a real-world example, check out the below calendar.
What if I were to ask you the year of the circled day? You would answer "2018".
The YEAR function returns the year for a given timestamp.
What's the circled day's month? It's in "November", or the "11th" month of the year.
The MONTH function returns the month for a given timestamp.
And lastly, what's the day for the circled date? It's the "15th" day of the month.
The DAY function returns the day in number form for a given timestamp.
Coding with YEAR, MONTH, & DAY
Let's see how this works with the same date above, but in an Excel worksheet.
Here is the template for the YEAR function:
To determine the year of the given date, we'd code the following...
...which would result in:
The template for MONTH is:
So, for our month, we'd type the following:
This would result in...
Lastly, here's the template for DAY:
To determine the day of the month for the timestamp, we'd code this:
This code turns into the following output:
Based on this result, we are able to understand that 43419 represents 11/15/2018.
What is the MONTH for the following serial number?
Next up, let's learn how to use the SUM and AutoSUM functions!
Excel Cram Kit (Exam 1)
Want to unlock content? Get your Excel Cram Kit (Exam 1) now!
|Apply||PRACTICE EXCEL EXAM 1 (PREVIEW ONLY)|
|Tools||Excel Nerd Notes (Exam 1) (PREVIEW ONLY)|
|Lesson||YEAR, MONTH, DAY|
|Lesson||SUM & AutoSUM|
|Lesson||Relative vs. Absolute Cell References|
|Lesson||WEEKDAY vs. WORKDAY (PREVIEW ONLY)|
|Lesson||VLOOKUP (PREVIEW ONLY)|
|Lesson||PMT (PREVIEW ONLY)|
|Lesson||IF (PREVIEW ONLY)|
|Lesson||Percent change (PREVIEW ONLY)|
|Lesson||Excel charts (PREVIEW ONLY)|
|Lesson||Importing text files (PREVIEW ONLY)|
Excel Reviews (Exam 1)
"I bought this Cram Kit the night before my exam, and it helped me tremendously. It provides step-by-step explanations for all the units covered in class."
Oct. 14, 2021