Hi - Dave here.

Given a list of birthdays, how can you count birthdays per year?

Although you can solve this problem with the COUNTIFS function, the formula is somewhat complicated because you must create a start and end date for each year.

A better solution is to use the SUMPRODUCT function and Boolean logic. The formula in the worksheet below is:

=SUMPRODUCT(--(YEAR(data[Birthday])=E5))

SUMPRODUCT formula to count birthdays by year

[download the workbook and read the full explanation]

Boolean logic is a way of handling TRUE and FALSE values like 1 and 0. This is an important skill with new functions like XLOOKUP and FILTER which use this technique often to apply multiple criteria. This is a good basic example.

The article above explains the details and includes a workbook with both the SUMPRODUCT formula and the COUNTIFS formula. Have a look and try it out for yourself.

Excel formulas

We maintain a large list of working formulas here.

If you need more structure, we also offer video training.

Have a fun and safe weekend!

Dave

 

Exceljet Logo
Exceljet
P.O. Box 4804
Salt Lake City, UT 84110

Copyright © 2021 Exceljet, All rights reserved.
You received this email because you are subscribed to our newsletter.
To unsubscribe, click the link below.