ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel formula sumproduct and age ranges (https://www.excelbanter.com/excel-discussion-misc-queries/196929-excel-formula-sumproduct-age-ranges.html)

tina

excel formula sumproduct and age ranges
 
I really hope someone can help as I am a novice at anything other than the
simplest Excel formula!

I want to calculate the age of customers per month in clusters for ages -
for example in March 08 I want to know how many were 18-24, how many were
25-40 etc etc. I have been using sumproduct for loads of other calculations
as follows

=SUMPRODUCT(--(MONTH('2008'!$L$2:$L$2000)=3))

but I dont know how to link on the additional query for age groups.

Thanks

Tina

M Kan

excel formula sumproduct and age ranges
 
Add a helper column to convert the age into an age group, then use a VLOOKUP
formula, withOUT exact match to class each age into a group. Use that column
in your SUMPRODUCT formula
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"Tina" wrote:

I really hope someone can help as I am a novice at anything other than the
simplest Excel formula!

I want to calculate the age of customers per month in clusters for ages -
for example in March 08 I want to know how many were 18-24, how many were
25-40 etc etc. I have been using sumproduct for loads of other calculations
as follows

=SUMPRODUCT(--(MONTH('2008'!$L$2:$L$2000)=3))

but I dont know how to link on the additional query for age groups.

Thanks

Tina


Bob Phillips[_3_]

excel formula sumproduct and age ranges
 
18-24

=SUMPRODUCT(--(DATEDIF(rng_DoBs,TODAY(),"Y")=18),--(DATEDIF(rng_DoBs,TODAY(),"Y")<24))

etc.

--
__________________________________
HTH

Bob

"Tina" wrote in message
...
I really hope someone can help as I am a novice at anything other than the
simplest Excel formula!

I want to calculate the age of customers per month in clusters for ages -
for example in March 08 I want to know how many were 18-24, how many were
25-40 etc etc. I have been using sumproduct for loads of other
calculations
as follows

=SUMPRODUCT(--(MONTH('2008'!$L$2:$L$2000)=3))

but I dont know how to link on the additional query for age groups.

Thanks

Tina




tina

excel formula sumproduct and age ranges
 
I dont really understand these answers - sorry. The data is by age rather
than date of birth, and I dont want them updated so that I know what age they
were when our service was used. I was hoping to link on to the end of the
sumproduct formula something like =18<=24 or use COUNTIF(OR) or IF(OR) for
the different ages so that the total number of people having that age range
in that month would be counted.

"Bob Phillips" wrote:

18-24

=SUMPRODUCT(--(DATEDIF(rng_DoBs,TODAY(),"Y")=18),--(DATEDIF(rng_DoBs,TODAY(),"Y")<24))

etc.

--
__________________________________
HTH

Bob

"Tina" wrote in message
...
I really hope someone can help as I am a novice at anything other than the
simplest Excel formula!

I want to calculate the age of customers per month in clusters for ages -
for example in March 08 I want to know how many were 18-24, how many were
25-40 etc etc. I have been using sumproduct for loads of other
calculations
as follows

=SUMPRODUCT(--(MONTH('2008'!$L$2:$L$2000)=3))

but I dont know how to link on the additional query for age groups.

Thanks

Tina






All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com