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

I would like a formula which will allow me to calculate the number of mondays
in a month which are either C- closed, H- holiday. or TT- term from the
following list. This will be duplcated for each month. I have tried to use:
=COUNTIF(B$2:B$32,"Monday")+COUNTIF(C$2:C$32,"H") but this adds the day and
the letter.

Can anyone help.

Regards

Kevan

Date April '10
1 Thursday H
2 Friday C
3
4
5 Monday C
6 Tuesday H
7 Wednesday H
8 Thursday H
9 Friday H
10
11
12 Monday H
13 Tuesday TT
14 Wednesday TT
15 Thursday TT
16 Friday TT
17
18
19 Monday TT
20 Tuesday TT
21 Wednesday TT
22 Thursday TT
23 Friday TT
24
25
26 Monday TT
27 Tuesday TT
28 Wednesday TT
29 Thursday TT
30 Friday TT
31


Days 22

Term Time TT
Monday 18
Tuesday 18
Wednesday 18
Thursday 19
Friday 19

Holiday H
Monday 10
Tuesday 4
Wednesday 10
Thursday 11
Friday 11

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Countif Function??

Try

=SUMPRODUCT((A2:A200="Monday")*(B2:B200={"C","H"," TT"}))

--

HTH

Bob

"Kevan" wrote in message
...
I would like a formula which will allow me to calculate the number of
mondays
in a month which are either C- closed, H- holiday. or TT- term from the
following list. This will be duplcated for each month. I have tried to
use:
=COUNTIF(B$2:B$32,"Monday")+COUNTIF(C$2:C$32,"H") but this adds the day
and
the letter.

Can anyone help.

Regards

Kevan

Date April '10
1 Thursday H
2 Friday C
3
4
5 Monday C
6 Tuesday H
7 Wednesday H
8 Thursday H
9 Friday H
10
11
12 Monday H
13 Tuesday TT
14 Wednesday TT
15 Thursday TT
16 Friday TT
17
18
19 Monday TT
20 Tuesday TT
21 Wednesday TT
22 Thursday TT
23 Friday TT
24
25
26 Monday TT
27 Tuesday TT
28 Wednesday TT
29 Thursday TT
30 Friday TT
31


Days 22

Term Time TT
Monday 18
Tuesday 18
Wednesday 18
Thursday 19
Friday 19

Holiday H
Monday 10
Tuesday 4
Wednesday 10
Thursday 11
Friday 11



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Countif Function??

Or to use your ranges

=SUMPRODUCT((B$2:B$32="Monday")*(C$2:C$32={"C","H" ,"TT"}))

--

HTH

Bob

"Kevan" wrote in message
...
I would like a formula which will allow me to calculate the number of
mondays
in a month which are either C- closed, H- holiday. or TT- term from the
following list. This will be duplcated for each month. I have tried to
use:
=COUNTIF(B$2:B$32,"Monday")+COUNTIF(C$2:C$32,"H") but this adds the day
and
the letter.

Can anyone help.

Regards

Kevan

Date April '10
1 Thursday H
2 Friday C
3
4
5 Monday C
6 Tuesday H
7 Wednesday H
8 Thursday H
9 Friday H
10
11
12 Monday H
13 Tuesday TT
14 Wednesday TT
15 Thursday TT
16 Friday TT
17
18
19 Monday TT
20 Tuesday TT
21 Wednesday TT
22 Thursday TT
23 Friday TT
24
25
26 Monday TT
27 Tuesday TT
28 Wednesday TT
29 Thursday TT
30 Friday TT
31


Days 22

Term Time TT
Monday 18
Tuesday 18
Wednesday 18
Thursday 19
Friday 19

Holiday H
Monday 10
Tuesday 4
Wednesday 10
Thursday 11
Friday 11



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Countif Function??

One way...

=SUMPRODUCT(--(B2:B32="Monday"),--(ISNUMBER(MATCH(C2:C32,{"C","H","TT"},0))))

--
Biff
Microsoft Excel MVP


"Kevan" wrote in message
...
I would like a formula which will allow me to calculate the number of
mondays
in a month which are either C- closed, H- holiday. or TT- term from the
following list. This will be duplcated for each month. I have tried to
use:
=COUNTIF(B$2:B$32,"Monday")+COUNTIF(C$2:C$32,"H") but this adds the day
and
the letter.

Can anyone help.

Regards

Kevan

Date April '10
1 Thursday H
2 Friday C
3
4
5 Monday C
6 Tuesday H
7 Wednesday H
8 Thursday H
9 Friday H
10
11
12 Monday H
13 Tuesday TT
14 Wednesday TT
15 Thursday TT
16 Friday TT
17
18
19 Monday TT
20 Tuesday TT
21 Wednesday TT
22 Thursday TT
23 Friday TT
24
25
26 Monday TT
27 Tuesday TT
28 Wednesday TT
29 Thursday TT
30 Friday TT
31


Days 22

Term Time TT
Monday 18
Tuesday 18
Wednesday 18
Thursday 19
Friday 19

Holiday H
Monday 10
Tuesday 4
Wednesday 10
Thursday 11
Friday 11



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
please help how to combine IF function with Countif function Dinesh Excel Worksheet Functions 6 March 30th 06 08:28 PM
countif function? denise Excel Worksheet Functions 4 March 14th 06 01:17 AM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM
CountIf Function Help ycart88 Excel Discussion (Misc queries) 9 May 18th 05 11:17 PM


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