# Counting and Matching Multiple Values

#### SarahShep

##### New Member
I wonder if anyone can help me..................

We have 3 people performing 3 different activities and I need to flag up the tenth time each activity has taken place per person.

I have tried to use the sumproduct and countif formulas but they don't seem to work, I can get them to count the total amount of activities per person but I need to break it up per person, per activity.

For example..... I need the formula to flag up every 3rd time Katherine is Swimming or Running or Walking.

Column A Column B

Katherine Swimming
Laura Walking
Sarah Walking
Laura Walking
Laura Walking
Emma Running
Katherine Swimming
Sarah Running
Sarah Running
Laura Swimming
Katherine Running
Katherine Swimming
Katherine Running

Thanks

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

#### fairwinds

##### MrExcel MVP
Hi,

Try:

=(MOD(SUMPRODUCT((\$A\$1:A1=\$F\$1)*(\$B\$1:B1=\$F\$2)),\$F\$3)=0)*(A1=\$F\$1)*(B1=\$F\$2)

In C1 and drag down.
Book1
ABCDEFG
1KatherineSwimming0NameLaura
2LauraWalking0ActivityWalking
3SarahWalking0Times3
4LauraWalking0
5LauraWalking1
6EmmaRunning0
7KatherineSwimming0
8SarahRunning0
9SarahRunning0
10LauraSwimming0
11KatherineRunning0
12KatherineSwimming0
13KatherineRunning0
Sheet1

Thanks very much

Thanks very much

Replies
18
Views
464
Replies
2
Views
294
Replies
1
Views
182
Replies
9
Views
163
Replies
6
Views
131

1,172,140
Messages
5,879,273
Members
433,416
Latest member
montex01

### 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.

### Which adblocker are you using?

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

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