Variable Index Match

mozga628

New Member
Joined
Feb 18, 2019
Messages
4
hello, the company i work for maintains an employee list in an SQL database that i have imported into excel as a table. i have i used the rank function so that each employee can be referenced alphabetically by team.


i have also created a drop down that lists the team name, and another drop down that lists data columns in the table.

my starting point is this:
=INDEX(Agents[FullName],MATCH(row()-1,Agents[TEAM1],0))
this will give me the full name of the first person (alphabetically) on TEAM1 assuming we are on row 2.

how can i change "FullName" and "TEAM1" to be user defined from the drop down list? (preferably without endless nested logic)
=IFERROR(INDEX(Agents[$A$1],MATCH(row()-1,Agents[$A$2],0)),"")

my goal is to be able to select a team and any employee data on the table: Example: John Dough Domain\UID Telephone# ETC
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
=index(indirect("Agents["&$G$1&"]"),match(row()-1,indirect("Agents["&$B$1&"]"),0))
essentially the indirect command allowed me to build the search manually!
i solved my own question, but i hope this helps someone else, cuz it gave me a heck of a challenge!
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

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