MSBA-175 · Lesson 8 of 12 · 20 min
Date, financial and statistical functions
▶ Video coming soon A video version of this lesson is on the way.
Maple & Pine lives by the calendar. Deposits fall due a set number of working days after booking, final payments are due before the event, and suppliers want their invoices paid within terms. In late October, Rosalind also started looking at financing a delivery van and wanted to know what the monthly payment would be. Dagny's eighth session covered three exam objectives that meet in these questions: use advanced date and time functions (NOW, TODAY, WEEKDAY and WORKDAY), the financial parts of perform data analysis (PMT and NPER), and troubleshoot formulas, because date and financial formulas are where subtle errors hide.
How Excel stores dates and times
Excel stores a date as a serial number: the number of days since January 0, 1900, so January 1, 1900 is 1 and January 1, 2027 is 46,388. A time is a fraction of a day: noon is 0.5 and 6:00 PM is 0.75. A date with a time is the sum of the two. Everything in this lesson follows from that. Subtracting two dates gives the number of days between them; adding 30 to a date gives the date 30 days later; formatting decides whether the number looks like a date.
NOW and TODAY
TODAY() returns the current date and NOW() returns the current date and time. Both take no arguments and both are volatile: they recalculate every time the workbook calculates, so a sheet that uses them is always current but never fixed. To stamp a fixed date, type it or press Ctrl+; (Ctrl+semicolon); Ctrl+Shift+; stamps the current time.
=D5-TODAY()
=TODAY()+30
=NOW()-B5
=INT(NOW())=TODAY()Dagny's days-to-event column uses =D5-TODAY() formatted as a number. On the event day it returns 0, before it positive numbers and after it negative numbers, which the conditional formatting rule from lesson 3 relies on.
WEEKDAY
WEEKDAY returns a number for the day of the week. Its second argument, return_type, decides which day is 1, and getting it wrong is a classic error.
| return_type | Numbering | Use |
|---|---|---|
| 1 or omitted | Sunday = 1 to Saturday = 7 | The default |
| 2 | Monday = 1 to Sunday = 7 | Weekends are 6 and 7, so >5 means weekend |
| 3 | Monday = 0 to Sunday = 6 | Days since Monday |
| 11 to 17 | Monday = 1 through Sunday = 1 as the first day | Weeks that start on other days |
Return type 2 makes weekend tests simple: =WEEKDAY(D5,2)>5 is TRUE for Saturday and Sunday. With the default, the same test needs OR(WEEKDAY(D5)=1, WEEKDAY(D5)=7). To display the day name instead, use the TEXT function, =TEXT(D5,"dddd"), or a custom format, rather than WEEKDAY.
WORKDAY and NETWORKDAYS
WORKDAY returns the date a given number of working days before or after a start date, skipping Saturdays, Sundays and an optional list of holidays. Maple & Pine's contract says the deposit is due ten business days after the booking date.
=WORKDAY(B5, 10, Holidays[Date])
=WORKDAY(D5, -15, Holidays[Date])
=WORKDAY.INTL(B5, 10, "0000011", Holidays[Date])
=NETWORKDAYS(TODAY(), D5, Holidays[Date])The holiday list is a table Dagny maintains each year with the provincial and federal statutory holidays that Maple & Pine observes. Because the argument is a table column, adding next year's holidays updates every due date. WORKDAY.INTL adds a weekend argument for businesses that work weekends: a seven-character string of 1s and 0s from Monday to Sunday, where 1 means a day off, or a number code such as 11 for Sunday only. Event companies often work Saturdays, so Dagny used "0000001" for the coordinator schedule.
Worked problem
When is the final payment due?
A wedding is on Saturday, June 12, 2027. Final payment is due 15 business days before the event, counting Monday to Friday and skipping holidays in Holidays[Date]. Write the formula and explain why the result is not simply three weeks earlier.
Show solution
- Use WORKDAY with the event date as the start: WORKDAY(D5, -15, Holidays[Date]).
- A negative number of days counts backwards.
- Fifteen business days is three working weeks only if no holiday falls in between.
- If a holiday falls in the period, WORKDAY moves one more business day earlier.
Answer: =WORKDAY(D5,-15,Holidays[Date]). Without holidays it returns Monday, May 24, 2027, which is itself a holiday in Canada, so with the holiday list it returns the business day before, Friday, May 21. On the US site the result depends on the holidays in the list.
Other date functions worth knowing
Several functions not named on the exam appear in date tasks as helpers. DATE(year, month, day) builds a date from parts and rolls over correctly, so DATE(2027,13,1) is January 1, 2028. YEAR, MONTH and DAY take a date apart. EDATE(start, months) returns the same day a number of months later, and EOMONTH(start, months) returns the last day of a month, which Dagny uses for month-end cut-offs. DATEDIF and YEARFRAC measure intervals in whole units or fractions of a year.
PMT: the payment on a loan
PMT returns the regular payment on a loan with a constant interest rate. Its arguments are the rate per period, the number of periods, the present value (the amount borrowed) and two optional ones: the future value, and the type (0 for payments at the end of each period, 1 for the start).
=PMT(rate, nper, pv, [fv], [type])
=PMT(0.069/12, 60, 48000)
=-PMT(0.069/12, 60, 48000)
=PMT(0.069/12, 60, 48000, -8000)The two rules that cause most errors are matching the periods and the sign convention. The rate and the number of periods must use the same unit: a yearly rate of 6.9 percent paid monthly over five years is a rate of 0.069/12 for 60 periods. And Excel treats money received as positive and money paid as negative, so borrowing 48,000 (received) gives a negative payment of about 948.20 (paid out). Putting a minus sign in front of PMT, or entering the loan as a negative, shows the payment as a positive number.
NPER: how many payments
NPER answers the reverse question: how many periods does it take to pay off a loan, or to reach a savings goal, at a given payment? Its arguments are rate, payment, present value and the optional future value and type.
=NPER(0.069/12, -1200, 48000)
=NPER(0.035/12, -500, 0, 25000)The exam objective is worded forecast data by using the AND(), IF(), and NPER() functions, which describes formulas that combine them, such as checking whether a savings plan reaches its goal in time. Dagny built one for the marquee fund: =IF(AND(NPER(0.035/12,-B2,0,15000)<=36, B2<=700), "On track", "Review"), which says "On track" if the monthly saving in B2 reaches a 15,000 deposit for the marquee within three years and stays within the 700 a month Rosalind said she could afford.
| Function | Answers | Remember |
|---|---|---|
| PMT | What is the payment per period? | Rate and periods in the same unit; result negative for a loan received |
| NPER | How many periods? | Payment negative when present value is positive |
| PV | How much can I borrow for this payment? | Same arguments, solving for the present value |
| FV | How much will this grow to? | Same arguments, solving for the future value |
| RATE | What interest rate is this? | Iterative; may need a guess |
Statistical functions for describing data
The exam objective names only the conditional aggregation functions from lesson 5 for statistics, but Expert-level tasks often ask you to describe a set of values, and a handful of statistical functions cover nearly every case. Dagny used them on the guest counts of the 2026 weddings to answer Rosalind's question, "What is a typical wedding for us?"
| Function | Returns | Guest counts example |
|---|---|---|
| AVERAGE | The arithmetic mean | 118 |
| MEDIAN | The middle value; resistant to extreme values | 104 |
| MODE.SNGL | The most frequent value | 120 |
| STDEV.S | The standard deviation of a sample | About 46 |
| PERCENTILE.INC | The value below which a given share of values falls | 90th percentile about 180 |
| QUARTILE.INC | The quartile boundaries | Q1 about 82, Q3 about 146 |
| RANK.EQ | A value's rank in a list | A 230-guest wedding ranks 2nd |
| LARGE / SMALL | The k-th largest or smallest value | LARGE(list,3) is the third largest |
The mean was pulled upward by two very large weddings, which is why the median was the better answer to "typical". Lesson 11 shows the same data as a box and whisker chart, which draws the quartiles and outliers that these functions calculate. All of these functions ignore text and blank cells in a range, but they include zeros, so a guest count of 0 entered as a placeholder drags the average down; filtering with AVERAGEIFS(Bookings[Guests], Bookings[Guests], ">0") avoids that.
=MEDIAN(FILTER(Bookings[Guests], Bookings[Event type]="Wedding"))
=PERCENTILE.INC(Bookings[Guests], 0.9)
=RANK.EQ(C5, Bookings[Guests], 0)The figures in the table are illustrative values for Maple & Pine's 2026 weddings, not industry statistics.
Troubleshooting formulas
The exam objective troubleshoot formulas lists four tools: trace precedence and dependence, the Watch Window, error checking rules, and Evaluate Formula. All four are on the Formulas > Formula Auditing group.
Trace Precedents draws blue arrows from the cells a formula uses to the formula; Trace Dependents draws arrows from the selected cell to the formulas that use it. Clicking again traces another level. A black dashed arrow with a small sheet icon means the link goes to another sheet or workbook; double-clicking it opens Go To with the destinations. Remove Arrows clears them. Dagny traced the van payment cell back to find that the rate came from a cell labelled "yearly" but containing a monthly figure.
The Watch Window keeps chosen cells in view while you work elsewhere. Add a watch, and the window shows the workbook, sheet, name, cell, current value and formula, updating as values change. Dagny watched the budget's net income cell while editing venue costs on another sheet.
Error checking is controlled by rules in File > Options > Formulas > Error checking rules: cells containing formulas that result in an error, numbers formatted as text, formulas inconsistent with adjacent formulas, formulas omitting cells in a region, unlocked cells containing formulas, and others. A green triangle marks a cell breaking a rule, and Formulas > Error Checking steps through them one by one. Evaluate Formula shows a formula with the next part to be calculated underlined; each click of Evaluate calculates that part, and Step In follows a reference into its own formula.
Worked problem
Why is the payment so high?
The van payment shows about 3,370 a month instead of the expected 948. The formula is =-PMT(B2,B3,B4) with B2 = 0.069, B3 = 60 and B4 = 48,000. Use the auditing tools to find the problem.
Show solution
- Select the payment cell and choose Formulas > Evaluate Formula.
- Click Evaluate and watch B2 become 0.069, a yearly rate used as a monthly one.
- Trace Precedents to confirm which cells feed the formula.
- Fix the formula to =-PMT(B2/12,B3,B4) and confirm it returns about 948.
Answer: The rate was annual while the periods were monthly. Dividing the rate by 12 matches the units.
Common mistakes
MistakeUsing a yearly rate with monthly periods in PMT or NPER.
InsteadDivide the rate by 12 and use months for the periods.
MistakeUsing WEEKDAY(D5)>5 to test for weekends.
InsteadUse WEEKDAY(D5,2)>5, where Saturday and Sunday are 6 and 7.
MistakeUsing TODAY() to record when something happened.
InsteadStamp a fixed date with Ctrl+; because TODAY() changes daily.
MistakeLeaving holidays out of WORKDAY.
InsteadPoint the holidays argument at a maintained list.
MistakeFixing a number without tracing where it came from.
InsteadUse Trace Precedents and Evaluate Formula to find the cause.
Summary and key terms
- Dates are serial numbers and times are fractions of a day; NOW and TODAY are volatile.
- WEEKDAY's return_type decides which day is 1; type 2 makes Saturday 6 and Sunday 7.
- WORKDAY adds business days and skips holidays; WORKDAY.INTL sets custom weekends.
- PMT returns a loan payment and NPER the number of periods; match the period units and mind the signs.
- Trace arrows, the Watch Window, error checking rules and Evaluate Formula troubleshoot formulas.
- Serial number
- The number Excel uses to store a date.
- Volatile function
- A function that recalculates every time the workbook calculates.
- WORKDAY
- A function that returns a date a number of business days from a start date.
- PMT
- A function that returns the periodic payment for a loan or investment.
- NPER
- A function that returns the number of periods for a loan or investment.
- Watch Window
- A window that shows chosen cells' values while you work elsewhere.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Which shortcut enters today's date as a fixed value?
Show answer
Ctrl+; (Ctrl+semicolon).
What rate argument does PMT need for 6 percent a year paid monthly?
Show answer
0.06/12.
Which function counts business days between two dates?
Show answer
NETWORKDAYS.
Which tool calculates a formula one part at a time?
Show answer
Evaluate Formula.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.