Index match with rows to find name in list

Cyberpunk001

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

I want to be able to have a team name automatically updated as I filter a database of staff.
For example I have a list of staff members belonging to a team, team being an arbitrary name, such as a supervisor name.
As the database grows and more teams are assembled, a whole list of names will appear under TEAM.
At the moment, I don't have a viable method of automatically updating cell A4 to give me the name once I have filtered for any given team name.

I have a register with a header on top, one in particular for "TEAM", filtered by team name,which is a range from NQ6:NQ118.
Whenever I filter a team name, eg, DANNY, I want cell A4 to also output "DANNY".

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]ROW NUMBER[/TD]
[TD]COLUMN A[/TD]
[TD]COLUMN B[/TD]
[TD]COLUMN C[/TD]
[TD]COLUMN NQ[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]NAME[/TD]
[TD]SURNAME[/TD]
[TD]CLOCK NO[/TD]
[TD]TEAM[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]NAME[/TD]
[TD][/TD]
[TD][/TD]
[TD]DANNY[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]SURNAME[/TD]
[TD][/TD]
[TD]JACOB[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]NUMBER[/TD]
[TD]SAMMY[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD]SURNAME[/TD]
[TD][/TD]
[TD]CATHY[/TD]
[/TR]
</tbody>[/TABLE]










In Cell A4, I have inserted a formula as below:
{=INDEX(TEAM,MIN(IF(SUBTOTAL(3,OFFSET(NQ6:NQ118,ROWS(TEAM)-ROW(NQ6),0)),ROWS(TEAM)-ROW(NQ6)+1)))}
The headings are in row 5.

Here TEAM denotes a defined name, ranged from NQ6:NQ118.

Sorry guys don't know how to upload a screenshot just yet:stickouttounge:

Any help will be greatly appreciated
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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