Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Werner Rohrmoser
 
Posts: n/a
Default Counting with Array Formula

Hello,

below you can see a table devided in months and weeks.
In every week there can occur an event, here called "A".

Question:
How can I count in how many months an event happens.
Result for table below is 2, in Jan and in Mar.

Jan Jan Jan Jan Feb Feb Feb Feb Mar Mar Mar Mar
wk1 wk2 wk3 wk4 wk5 wk6 wk7 wk8 wk9 wk10 wk11 wk12
A A A A

Thanks for your support.

Regards
Werner

  #2   Report Post  
Rowan
 
Posts: n/a
Default

Enter Jan in A6, Feb in A7 etc:
In B6 enter
=SUMPRODUCT(--($A$1:$AV$1=A6),--($A$3:$AV$3="A"))
and copy down.

Hope this helps
Rowan

Werner Rohrmoser wrote:
Hello,

below you can see a table devided in months and weeks.
In every week there can occur an event, here called "A".

Question:
How can I count in how many months an event happens.
Result for table below is 2, in Jan and in Mar.

Jan Jan Jan Jan Feb Feb Feb Feb Mar Mar Mar Mar
wk1 wk2 wk3 wk4 wk5 wk6 wk7 wk8 wk9 wk10 wk11 wk12
A A A A

Thanks for your support.

Regards
Werner

  #3   Report Post  
Werner Rohrmoser
 
Posts: n/a
Default

Thanks for your answer,
but I'd like to know the number of months, where I have an "A" and not
the number of weeks.

Werner

  #4   Report Post  
Rowan
 
Posts: n/a
Default

Now I see. That I'm not sure of. I'll get back to you if I come up with
something.

Regards
Rowan

Werner Rohrmoser wrote:
Thanks for your answer,
but I'd like to know the number of months, where I have an "A" and not
the number of weeks.

Werner

  #5   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Werner

Could you not use Rowan's suggestion, then in another cell
=COUNTIF(B6:B11,"0")
Regards

Roger Govier


Werner Rohrmoser wrote:
Thanks for your answer,
but I'd like to know the number of months, where I have an "A" and not
the number of weeks.

Werner



  #6   Report Post  
KL
 
Posts: n/a
Default

try this ARRAY formula (confirm with Ctrl+Shift+Enter, not jut Enter):

=SUM(--ISNUMBER(MATCH({"Jan","Feb","Mar","Apr","May","Jun ","Jul","Aug","Sep","Oct","Nov","Dec"},IF(A3:L3="A ",$A$1:$L$1),0)))

Regards,
KL


"Werner Rohrmoser" wrote in message
oups.com...
Thanks for your answer,
but I'd like to know the number of months, where I have an "A" and not
the number of weeks.

Werner



  #7   Report Post  
Werner Rohrmoser
 
Posts: n/a
Default

Hi KL,

thank you very much, that's exactly what I need in order to solve my
task.

Werner

  #8   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Array entered:

=SUM(N(FREQUENCY(IF(A3:L3="A",MATCH(A1:L1,A1:L1,0) ),MATCH(A1:L1,A1:L1,0))0))

Biff

"Werner Rohrmoser" wrote in message
oups.com...
Hello,

below you can see a table devided in months and weeks.
In every week there can occur an event, here called "A".

Question:
How can I count in how many months an event happens.
Result for table below is 2, in Jan and in Mar.

Jan Jan Jan Jan Feb Feb Feb Feb Mar Mar Mar Mar
wk1 wk2 wk3 wk4 wk5 wk6 wk7 wk8 wk9 wk10 wk11 wk12
A A A A

Thanks for your support.

Regards
Werner



  #9   Report Post  
Werner Rohrmoser
 
Posts: n/a
Default

Hi Biff,

thanks a lot, that's a formula which can be used generally
without using an array constant like {"Jan", "Feb", etc.}
Great!

Werner

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
array formula Jonathan Cooper Excel Discussion (Misc queries) 4 September 9th 05 12:27 PM
#VALUE! On An Array Formula Referencing a Range Outside The Workbo paige Excel Discussion (Misc queries) 5 September 9th 05 12:05 AM
Array Formula help pls. klam Excel Worksheet Functions 4 August 24th 05 04:05 PM
Array Formula Karen Excel Worksheet Functions 2 June 7th 05 06:49 PM
Help with array formula Excel Worksheet Functions 2 January 20th 05 04:17 PM


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