Counting with Array Formula

W

Werner Rohrmoser

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
 
R

Rowan

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
 
W

Werner Rohrmoser

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
 
R

Rowan

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

Regards
Rowan
 
R

Roger Govier

Hi Werner

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

Roger Govier
 
B

Biff

Hi!

Array entered:

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

Biff
 
W

Werner Rohrmoser

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Counting Array element 4
Schedule Randomizer 1
3 Weeks Forecast-Excel 2003 4
counting absentees 1
lookup or match? 5
How to check and skip column during paste 1
Sum with 3 conditions 9
MIN DATE from Array 2

Top