使用条件计算多个列中的人数 [英] Count number of people across multiple columns with criteria
问题描述
我有一个工作表,其中每个雇员和家庭成员的生日都有6列。我希望获取20岁以下的孩子总数,而不根据单元格B1中的日期添加任何其他列。我考虑使用COUNTIF,但需要执行一个范围。
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:
我正在寻找一个公式,该公式从CF列中提取所有生日,并计算有多少个20岁以下的孩子。
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:
谢谢!
推荐答案
使用COUNTIF():
Use COUNTIF():
=COUNTIF(C3:F3,">" & DATE(YEAR($B$1)-20,MONTH($B$1),DAY($B$1)))
这篇关于使用条件计算多个列中的人数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!