Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Advanced Countif (?) Formula

I have an excel spreadsheet in which I am trying to calculate: for example:

1. the number of males or females that have health insurance
2. the average age of the males or females that have health insurance and
the averge tenure of the males or females that have health insurance. In
other words -

The spreadsheet contains a list by row of males and females (a census of
employees at a compnay) hat contain age, gender, date of hire and health
insurance status.

Examples of the columns and fields:

Gender Date of Birth Date of Hire Health
Status
M 08/12/70 05/01/07 EE
F 08/12/70 05/01/07 FAM
F 03/12/70 04/01/06 DEC


I need to be able to, by a formula, determine answers for only those males
(one answer) or females (a different answer) who have health insurance.

fields/column headers of data:

gender: the fields in this column contain the data 'm' for male and 'f'
for female

health insurance: the field in this column contains data - either 'ee' or
'fam' for those males/females in the list that have 'ee' or 'fam' health
insurance; if the male does not have health insurance the field in this
column contains data - either 'dec' or 'oc'

age: the fields in this column both contain 'date' data for all males in
the list

tenu the fields in this column both contain 'date' data for all males in
the list



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Advanced Countif (?) Formula

Number of males

=COUNTIF(A:A,"M")

Averages of males with health insurance

=SUMPRODUCT(--(A2:A20="M"),--((D2:D20="EE")+(D2:D20="FAM")))/SUMPRODUCT(--(A2:A20={"M","F"}))

Average tenure

=SUMPRODUCT(--(A2:A20="M"),--((D2:D20="EE")+(D2:D20="FAM")),(C2:C20-B2:B20))/COUNTIF(A:A,"M")

--
__________________________________
HTH

Bob

"Glendae" wrote in message
...
I have an excel spreadsheet in which I am trying to calculate: for example:

1. the number of males or females that have health insurance
2. the average age of the males or females that have health insurance and
the averge tenure of the males or females that have health insurance. In
other words -

The spreadsheet contains a list by row of males and females (a census of
employees at a compnay) hat contain age, gender, date of hire and health
insurance status.

Examples of the columns and fields:

Gender Date of Birth Date of Hire
Health
Status
M 08/12/70 05/01/07 EE
F 08/12/70 05/01/07
FAM
F 03/12/70 04/01/06
DEC


I need to be able to, by a formula, determine answers for only those males
(one answer) or females (a different answer) who have health insurance.

fields/column headers of data:

gender: the fields in this column contain the data 'm' for male and 'f'
for female

health insurance: the field in this column contains data - either 'ee' or
'fam' for those males/females in the list that have 'ee' or 'fam' health
insurance; if the male does not have health insurance the field in this
column contains data - either 'dec' or 'oc'

age: the fields in this column both contain 'date' data for all males in
the list

tenu the fields in this column both contain 'date' data for all males
in
the list





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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Countif SFCWoods Excel Worksheet Functions 6 December 12th 07 06:46 PM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Advanced Formula... Steven Sinclair Excel Discussion (Misc queries) 2 November 14th 05 08:26 PM
Advanced COUNTIF Function License Boy Excel Worksheet Functions 3 December 8th 04 02:23 PM
Excel 2000 - Advanced IF AND ELSE COUNTIF?? halo14 Excel Worksheet Functions 1 November 5th 04 06:53 PM


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

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

About Us

"It's about Microsoft Excel"