Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default COUNTIF or SUMPRODUCT

Not sure which way to go on this. I have three columns (Race, Rank, Gender)
and I need to count how many white,sgt,males there are and put it in one cell
in another worksheet in the same book.

Have search the board and everything I've tried has not worked. If you
could help me with this, I can replace what I need.

Race column is D2:D4000
Rank Column is E2:E4000
Gender Column is G2:G4000

Thanks!
Dan


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default COUNTIF or SUMPRODUCT

Try this:

=SUMPRODUCT(--(D2:D4000="white"),--(E2:E4000="sgt"),--(G2:G4000="male"))

Better to use cells to hold the criteria:

A1 = white
B1 = sgt
C1 = male

=SUMPRODUCT(--(D2:D4000=A1),--(E2:E4000=B1),--(G2:G4000=C1))


--
Biff
Microsoft Excel MVP


"SFC Traver" wrote in message
...
Not sure which way to go on this. I have three columns (Race, Rank,
Gender)
and I need to count how many white,sgt,males there are and put it in one
cell
in another worksheet in the same book.

Have search the board and everything I've tried has not worked. If you
could help me with this, I can replace what I need.

Race column is D2:D4000
Rank Column is E2:E4000
Gender Column is G2:G4000

Thanks!
Dan




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default COUNTIF or SUMPRODUCT

Thanks. It worked. I tried to make it simplier for whomever takes over for me
by assigning names to the cell ranges and I keep getting the #NUM error.

I named the D column "REDCAT", E column "Grade", G column "Gender" and then
named each cell like you recommended (white, black, sgt, ssg, etc).

Then I replaced the formula you sent and it's not working. Can I do this?

=SUMPRODUCT(--(REDCAT=WHITE),--(Gender=M),--(Grade=Jr NCO))

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(D2:D4000="white"),--(E2:E4000="sgt"),--(G2:G4000="male"))

Better to use cells to hold the criteria:

A1 = white
B1 = sgt
C1 = male

=SUMPRODUCT(--(D2:D4000=A1),--(E2:E4000=B1),--(G2:G4000=C1))


--
Biff
Microsoft Excel MVP


"SFC Traver" wrote in message
...
Not sure which way to go on this. I have three columns (Race, Rank,
Gender)
and I need to count how many white,sgt,males there are and put it in one
cell
in another worksheet in the same book.

Have search the board and everything I've tried has not worked. If you
could help me with this, I can replace what I need.

Race column is D2:D4000
Rank Column is E2:E4000
Gender Column is G2:G4000

Thanks!
Dan





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default COUNTIF or SUMPRODUCT

Answered in your other post.

--
Biff
Microsoft Excel MVP


"SFC Traver" wrote in message
...
Thanks. It worked. I tried to make it simplier for whomever takes over for
me
by assigning names to the cell ranges and I keep getting the #NUM error.

I named the D column "REDCAT", E column "Grade", G column "Gender" and
then
named each cell like you recommended (white, black, sgt, ssg, etc).

Then I replaced the formula you sent and it's not working. Can I do this?

=SUMPRODUCT(--(REDCAT=WHITE),--(Gender=M),--(Grade=Jr NCO))

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(D2:D4000="white"),--(E2:E4000="sgt"),--(G2:G4000="male"))

Better to use cells to hold the criteria:

A1 = white
B1 = sgt
C1 = male

=SUMPRODUCT(--(D2:D4000=A1),--(E2:E4000=B1),--(G2:G4000=C1))


--
Biff
Microsoft Excel MVP


"SFC Traver" wrote in message
...
Not sure which way to go on this. I have three columns (Race, Rank,
Gender)
and I need to count how many white,sgt,males there are and put it in
one
cell
in another worksheet in the same book.

Have search the board and everything I've tried has not worked. If you
could help me with this, I can replace what I need.

Race column is D2:D4000
Rank Column is E2:E4000
Gender Column is G2:G4000

Thanks!
Dan







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
Sumproduct and Countif [email protected] Excel Discussion (Misc queries) 0 April 2nd 07 02:51 PM
COUNTIF or SUMPRODUCT? scott Excel Worksheet Functions 4 August 28th 06 03:51 AM
SUMPRODUCT/COUNTIF luvthavodka Excel Discussion (Misc queries) 12 June 17th 06 02:58 AM
sumproduct vs. countif Coal Miner Excel Discussion (Misc queries) 1 June 15th 06 09:34 PM
SUMPRODUCT & COUNTIF Connie Martin Excel Worksheet Functions 2 December 16th 04 06:53 PM


All times are GMT +1. The time now is 12:45 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"