Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Countif? or IF statement??

I would like a formula that will look at column B and look for dept 1234 and
then look at column D to see how many of them have an X in that column and
give me the resulting number.

I am looking to do the same with the dept # and blanks in column D and then
also with dept# and M in column D.

We have about 25 different dept. numbers and 300+ people so am trying to
automate the attend (x) and made up (M) calculations for each dept.


B C D E
Dept Jan Feb
1234 X
4567
1234 X
8921 M
1234
1234 M

Any help will be greatly appreciated!

Thanks,
Angie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Countif? or IF statement??

=SUMPRODUCT(($B$2:$B$100=1234)*($D$2:$D$100="X"))

Note that if your departments are entered as text, you'll need to put the
1234 in quotes. As you may surmise, you could replace the '1234' with a cell
reference. For your other examples, simply change the "X" to "" or "M"
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"paankadu" wrote:

I would like a formula that will look at column B and look for dept 1234 and
then look at column D to see how many of them have an X in that column and
give me the resulting number.

I am looking to do the same with the dept # and blanks in column D and then
also with dept# and M in column D.

We have about 25 different dept. numbers and 300+ people so am trying to
automate the attend (x) and made up (M) calculations for each dept.


B C D E
Dept Jan Feb
1234 X
4567
1234 X
8921 M
1234
1234 M

Any help will be greatly appreciated!

Thanks,
Angie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Countif? or IF statement??

Try these:

=SUMPRODUCT(--(B2:B10=1234),--(D2:D10="X"))

=SUMPRODUCT(--(B2:B10=1234),--(D2:D10=""))

=SUMPRODUCT(--(B2:B10=1234),--(D2:D10="M"))

--
Biff
Microsoft Excel MVP


"paankadu" wrote in message
...
I would like a formula that will look at column B and look for dept 1234
and
then look at column D to see how many of them have an X in that column and
give me the resulting number.

I am looking to do the same with the dept # and blanks in column D and
then
also with dept# and M in column D.

We have about 25 different dept. numbers and 300+ people so am trying to
automate the attend (x) and made up (M) calculations for each dept.


B C D E
Dept Jan Feb
1234 X
4567
1234 X
8921 M
1234
1234 M

Any help will be greatly appreciated!

Thanks,
Angie



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
COUNTIF(AND Statement lccubb Excel Discussion (Misc queries) 2 December 31st 06 05:06 PM
countif statement italiavb Excel Worksheet Functions 4 July 14th 06 01:57 PM
If Statement with Countif Crazyhorse Excel Discussion (Misc queries) 3 April 10th 06 08:55 PM
Countif statement Steved Excel Worksheet Functions 11 September 28th 05 10:10 PM
countif statement Russell Hampton Excel Worksheet Functions 6 December 18th 04 07:39 PM


All times are GMT +1. The time now is 02:14 AM.

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"