Averaging Data with Multiple Lookups

FuriousD

New Member
Joined
Sep 1, 2016
Messages
35
Office Version
  1. 365
Platform
  1. MacOS
I have 2 workbooks - one with raw data and one where I want to average the data based on multiple rows of source data.

An example of the data is below.

Data Workbook Name: CA Data Export
Results Workbook Name: FF Data

A B C D E F G

Job Code
Job TitleGeographyIndustrySizeBase 25thBase 50th
SC16000631Diesel Mechanic SupervisorChicago, ILConsumer Goods$1B - $3B Revenues ($ USD)
63.8​
70.8​
SC16000631Diesel Mechanic SupervisorChicago, ILConsumer Goods7,500 - 15,000 FTEs
62.9​
69.8​
SC16000631Diesel Mechanic SupervisorChicago, ILFood & Beverage$1B - $3B Revenues ($ USD)
62.2​
69​
SC16000631Diesel Mechanic SupervisorChicago, ILFood & Beverage7,500 - 15,000 FTEs
61.3​
68​

I then need to pull the average of the Base 25th and Base 50th given the Job Code and Geography. I'm using an Index & Match formula to pull the data, but it's only returning the first result, not an average of the 4 lines of data.

My Index/Match Formula (below) returns the following results in Cell D2/E2:

=INDEX('CA Data Export'!$F$1:$F$1977,MATCH('FF Data'!A2&'FF Data'!B2,'CA Data Export'!$A$1:$A$1977&'CA Data Export'!$C$1:$C$1977,0))


A B C D E
Job CodeJobTitleCA ScopeBase 25thBase 50th
SC16000389Diesel Mechanic SupervisorChicago, IL
63.8
70.8

Any thoughts on how I would get it to return the average of the 4 lines?

TIA
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also do you mean two workbooks, or two worksheets? The formula looks as though it's looking at two sheets in the same workbook.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also do you mean two workbooks, or two worksheets? The formula looks as though it's looking at two sheets in the same workbook.
Sorry -

Correct - 2 worksheets in the same Workbook. And I'm on Excel 365 Excel for Mac v16.52
 
Upvote 0
In that case you can use averageifs like
Excel Formula:
=AVERAGEIFS('CA Data Export'!$F$1:$F$1977,'CA Data Export'!$A$1:$A$1977,A2,'CA Data Export'!$C$1:$C$1977,B2)
although I think the B2 on the end might need to be C2.

Also you should never use the name of the sheet the formula is on, as it can cause problems.
 
Upvote 0
Solution
Awesome - and so simple. I was way over complicating it.

Thanks
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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