lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to make my match() and Index() look more dynamic.
User is going to select name from a Data validation list
Then user will Select from another data validation list to tell excel what they want to return, Phone#, Address, or Salary
I can do the lookup if the column is fixed (col1, 2, 3) like the following
=INDEX($A$1:$D$20,MATCH($H$5,$A$1:$A$20,0),2)
That is to return phone# but I like to make it dynamic, I do not want to pass col2 to Index function. Is that possible? Thank you.
<tbody>
</tbody>
<tbody>
</tbody>
I want to make my match() and Index() look more dynamic.
User is going to select name from a Data validation list
Then user will Select from another data validation list to tell excel what they want to return, Phone#, Address, or Salary
I can do the lookup if the column is fixed (col1, 2, 3) like the following
=INDEX($A$1:$D$20,MATCH($H$5,$A$1:$A$20,0),2)
That is to return phone# but I like to make it dynamic, I do not want to pass col2 to Index function. Is that possible? Thank you.
select name |
john16 |
enter what you want |
<tbody>
</tbody>
name | ph# | address | salary |
john1 | 1 | 1 main st | 2472 |
john2 | 2 | 2 main st | 8646 |
john3 | 3 | 3 main st | 1156 |
john4 | 4 | 4 main st | 9592 |
john5 | 5 | 5 main st | 2862 |
john6 | 6 | 6 main st | 2155 |
john7 | 7 | 7 main st | 4604 |
<tbody>
</tbody>
Last edited: