Formuladrill

Level 4: Text and dates Exercise 76 of 118

Days in the month

An Excel formula exercise from Formuladrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.

The task

Return the number of days in the month that each date falls in. Fill B2 and B3.

What this exercise teaches

DAY(EOMONTH(date,0)) handles 28, 29, 30 and 31 without a lookup table, leap years included. It is the usual way to prorate a monthly amount by days.

A hint if you get stuck

EOMONTH(date, 0) is the last day of the same month. The day number of that date is the length of the month.

Functions used: DAY, EOMONTH

Try it now, free, no account needed

Your first 15 exercises on Formuladrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro unlocks every exercise, timed mode and the certificate.

Open this exercise

More exercises in Text and dates