How do I perform operations within a funtion that operates on colu

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to calculate the % of people under a certain age. In the
COUNTIF() funtion, how do I calculate the age and then compare it to the
chosen value?
e.x. =COUNTIF(A1:A3,(calculate age) <=60)

7/14/1932
4/28/1951
11/11/1939
 
COUNTIF has its limits. Here are 2 ways:

=SUMPRODUCT(--(YEAR(TODAY())-YEAR(A1:A3)<=60))
=SUMPRODUCT(--(DATEDIF(A1:A3,TODAY(),"y")<=60))

HTH
Jason
Atlanta, GA
 
THANKS

Jason Morin said:
COUNTIF has its limits. Here are 2 ways:

=SUMPRODUCT(--(YEAR(TODAY())-YEAR(A1:A3)<=60))
=SUMPRODUCT(--(DATEDIF(A1:A3,TODAY(),"y")<=60))

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top