# Collecting average values from multiple sheets with multiple conditions

#### redpoll

##### New Member
Hi all,

I have multi-sheet excel file where each sheet represents one round of golf hole by hole.

Sheet name = Round1

 A B C D E F 1 Hole Mts Score App Club Dist 2 1 349 4 S 6i 158 3 2 480 5 H 7i 150 4 3 212 3 S 9i 122

<tbody>
</tbody>
...

<tbody>
</tbody>

Sheet name = Round99

 A B C D E F 1 Hole Mts Score App Club Dist 2 1 349 4 S 6i 158 3 2 480 5 S 6i 150 4 3 212 3 H 9i 122

<tbody>
</tbody>
...

I would like to create one sheet that collects AVERAGE value from sheets Round1 to Round99 column F for each club (column E) when column D="H" as I've tried to illustrate below:

 A D 1 Club Distance 2 6i (AVG of F IF E2:E19="6i" and D2:D19="H") 3 7i (AVG of F IF E2:E19="7i" and D2:D19="H") 4 9i (AVG of F IF E2:E19="9i" and D2:D19="H")

<tbody>
</tbody>

<tbody>
</tbody>
Can someone help me on this?

Thank you!

#### Special-K99

##### Well-known Member
Using VBA or formulas?

#### redpoll

Any suggestions?

##### MrExcel MVP
In B2 of the destination sheet enter:

=SUMPRODUCT(SUMIFS(INDIRECT("'"&"Round"&ROW(\$1:\$99)&"'!F2:F19"),INDIRECT("'"&"Round"&ROW(\$1:\$99)&"'!E2:E19"),A2,INDIRECT("'"&"Round"&ROW(\$1:\$99)&"'!D2:D19"),"H"))/SUMPRODUCT(COUNTIFS(INDIRECT("'"&"Round"&ROW(\$1:\$99)&"'!E2:E19"),A2,INDIRECT("'"&"Round"&ROW(\$1:\$99)&"'!D2:D19"),"H"))

### Forum statistics

1,082,323
Messages
5,364,579
Members
400,809
Latest member
formulasataglance

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
• Complex Heat Map using conditional formatting
Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
• Conditional formatting
Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...