Update cell of filtered column header selection

Cyberpunk001

New Member
Joined
Aug 27, 2018
Messages
13
Good day all,

I would very much like to have a certain cell reference(A4) be updated with the team leader I select on the header filters.
Reason being, I have to print out the whole team for every team leader, and have the leader's name on top of the list.

I have a database with staff members belonging to different team leaders, for instance 30 random members belonging to a certain leader.
This database has many headers, of which the TEAM header is of importance here.

The structure looks like this:

CELL A4, NAME OF SELECTED TEAM ON HEADER FILTER.

ROW NUMBERCOLUMN ACOLUMN BCOLUMN NQ
5"NAME""SURNAME""TEAM"
6RANDYDE BROGLIJAMES
7SANDYREYNOLDSJAMES
8GILLABRAHAMSJAMES

<tbody>
</tbody>









So as I click the filter on the header "TEAM", cell ref NQ5, and select "Team leader 1", CELL A4 should automatically update with "Team leader 1".

Here is what I have tried so far, and it does not seem to solve the problem all that well:

=INDEX(TEAM,MIN(IF(SUBTOTAL(3,OFFSET(NQ6,ROW(TEAM)-ROW(NQ6),0)),ROW(TEAM)-ROW(NQ6)+1)))

I have made the range of Cells NQ6:NQ999 a defined name, called TEAM.
What this formula is trying to accomplish, is to look at the 1st cell below the header "TEAM", and display the result in cell A4.
You can imagine if I have multiple names in a list, all belonging to the same team, "James", and if I select "James" under team,
The first cell under the header will in fact say "James".

Hope this explains well enough what I am trying to convey.

Any help would be awesome!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Good day all,

I have confirmed on Excel Forum's post that this formula does indeed work, as an array:

https://www.excelforum.com/excel-general/1244928-update-cell-of-filtered-column-header-selection.html

{=INDEX(TEAM,MIN(IF(SUBTOTAL(3,OFFSET(NQ5,ROW(TEAM)-ROW(NQ5),0)),ROW(TEAM)-ROW(NQ5)+1)))}
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,545
Members
449,317
Latest member
chingiloum

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