# Possible COUNTIF solution

#### ollyhughes1982

##### Active Member
Hi,

I wonder if anyone might be able to help with some formulas, please. I have an existing table (columns A & B) that work perfectly, counting how many runs I have completed at each different parkrun venue. However, I would now like to some extra columns (C-G), but am not sure of how I calculate them. At the moment I have inserted the formulas that calculate what I want, but for all events, whereas I want them to calculate for the relevant event in that row.

So, what I essentially want to do is to keep the same calculation for each of the C-G columns, but with something added into the formula so that it is calculated only for that particular row's event.

At present, I have the following in columns C-G, which calculate correctly, but for all events:
• In A3: =IFERROR(UNIQUE(FILTER('All Completed Runs'!C3:C2002,'All Completed Runs'!E3:E2002<>"")),"")
• In B3: =IF(A3="","",COUNTIF('All Completed Runs'!C:C,A3#))
• In C3: =IF(A3="","",OFFSET(INDEX('All Completed Runs'!E3:E2002,MATCH(MAX('All Completed Runs'!E3:E2002),'All Completed Runs'!E3:E2002,FALSE)),0,21))
• In D3: =IF(A3="","",IFERROR(TEXT(SMALL('All Completed Runs'!Z3:Z2002,COUNTIF('All Completed Runs'!Z3:Z2002,0)+1),"HH:MM:SS"),""))
• In E3: =IF(A3="","",AVERAGE('All Completed Runs'!Z3:Z2002))
• In F3: =IF(A3="","",MAX('All Completed Runs'!Z3:Z2002))
• In G3: =IF(A3="","",IFERROR(MODE('All Completed Runs'!Z3:Z2002),"N/A - None / Multiple"))
Is it something really simple like just adding in a COUNTIF somewhere in each formula? I have tried a a few things, but without success.

parkrun - My parkrun Record (Oliver Hughes - A132324) WORKING.xlsx

Also posted on Excel Forum: Possible COUNTIF solution

#### ollyhughes1982

##### Active Member
These both worked perfectly, thanks. How / where would the MINIFS, MAXIFS & AVERAGEIFS go in the other formulae, please?

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### Fluff

##### MrExcel MVP, Moderator
They don't go in another formula, you just use them on their own.

#### ollyhughes1982

##### Active Member
Thanks, this worked great.

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback.

#### ollyhughes1982

##### Active Member

Now that I have my workbook working fully, I am now looking to try and reduce calculation time / file size (it’s now 31mb). I’m guessing I could likely replace most of my index match formulae with xlookup? Will this save a lot of calculation / file size?

#### Fluff

##### MrExcel MVP, Moderator
I suspect that you would be wasting your time, you have so many formulae in there that you have almost certainly exceeded Excel's ability to track them & therefore your entire workbook is volatile.
This means that whenever you change anything, all the formulae will re-calculate.
I feel you would have been better off using a database.

#### ollyhughes1982

##### Active Member
Ok, no problem. Thanks for your help

My pleasure.

Replies
3
Views
42
Replies
7
Views
65
Replies
9
Views
64
Replies
26
Views
2K
Replies
14
Views
453

1,127,809
Messages
5,627,019
Members
416,215
Latest member
Ostie3994

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