Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
crander8
 
Posts: n/a
Default How do I perform operations within a funtion that operates on colu

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


  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

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

-----Original Message-----
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


.

  #3   Report Post  
crander
 
Posts: n/a
Default

THANKS

"Jason Morin" wrote:

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

-----Original Message-----
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


.


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

one way:

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

for the usage of -- in SUMPRODUCT formulae, see

http://www.mcgimpsey.com/excel/doubleneg.html



In article ,
"crander8" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"