Average data in Column that changes location

cam339

New Member
Joined
Sep 10, 2017
Messages
3
Hi,

I have reports that span from Column A up to AQ in excel. On these reports I need to average based off the group name and response time but the column the response time is located on changes from report to report. Group name is always in the same column so is there a way I can fix the formula so it can pick up that the response time based off its header and not the column?

This is the formula I use at the moment on a template I have. AVERAGEIF('Data'!$M:$M,"Group",'Data'!$AQ:$AQ) The problem I have is that I need to update the $AQ to where ever the response time is now located. Any way around this?

Thank you.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try...

=AVERAGEIFS(INDEX(Data!$A:$AQ,0,MATCH("response time",INDEX(Data!$A:$AQ,1,0),0)),Data!$M:$M,"Group")

1. If you need using AVERAGEIF...

=AVERAGEIF(Data!$M:$M,"Group",INDEX(Data!$A:$AQ,0,MATCH("response time",INDEX(Data!$A:$AQ,1,0),0)))

2. The header value "response time" is expected to occur in the top row.

3. You can extend the range beyond column AQ if needed.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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