Hery0502
Hery0502

Reputation: 91

Count number of people across multiple columns with criteria

I have a worksheet that has 6 columns for each employee and family members birthdays. I am looking to get the total number of kids that are 20 years old and younger without adding any additional columns based on the date in cell B1. I looked into using COUNTIF, but it needs a range to execute.

Here is how my workbook looks: enter image description here

I am looking for one formula that takes all birthdays from columns C-F and counts how many children are younger than 20 years old. Is this possible?

Answers I am seeking from formula: enter image description here

Thank you!

Upvotes: 0

Views: 127

Answers (1)

Scott Craner
Scott Craner

Reputation: 152605

Use COUNTIF():

=COUNTIF(C3:F3,">" & DATE(YEAR($B$1)-20,MONTH($B$1),DAY($B$1)))

enter image description here

Upvotes: 1

Related Questions