COUNTIF/MATCH/INDEX question

colm

Board Regular
Joined
Jun 11, 2004
Messages
96
I know the answer is probably obvious to some of you but I cant see it it. I have a table of employees and week numbers like so


Week Number Employee
1 .................Mike
1................. Mike
1................. Mike
1................. John
1................. John
2................. Mike
2................. John
2 .................John
3 .................John
3 .................John
3 .................John
3 .................Mike
3 .................John
3 .................John
4 .................John
4 .................Mike
4 .................Mike
4 .................John
5 .................Mike
5 .................Mike
5 .................Mike


I add to this most days. I have tables running off this for each of the weeks that look like this


Week 5
John.......2
Mike ......3
Total ......5

When I add a new row onto the master table eg, 5, Mike I want my secondary tables to update automatically. I've tried COUNTIF and MATCH/INDEX but can't seem to get it right.

It can be done on a pivot table but a pivot is not appropriate in this case.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
What ff I use COUnTIF, AND and another COUNTIF? I can never use AND or OR properly. I'm not sure of the syntax.
 
Upvote 0
Hi,

Have a look..
Book1
ABCDEF
1Week NumberEmployeeWeek Number523
21MikeMike3
31MikeJohn1
41Mike
51John
61John
72Mike
82John
92John
103John
113John
123John
133Mike
143John
153John
164John
174Mike
184Mike
194John
205Mike
215Mike
225Mike
235John
Sheet1


Formula in F1:

=MATCH(100,A:A)

In E2 and copy down,

=SUMPRODUCT(--($A$2:INDEX(A:A,$F$1)=$E$1),--($B$2:INDEX(B:B,$F$1)=D2))

HTH
 
Upvote 0

Forum statistics

Threads
1,222,143
Messages
6,164,174
Members
451,880
Latest member
2da

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top