lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I have table like below, user will enter age and I want excel to return the name, so I did match/index function like this
=INDEX(A2:D7,MATCH(G4,D2:D7,0),1)
G4 = age
Now if user enter G4 = 40 excel will return john, how can I ask excel to return linda as well. I am thinking it must be array formula, am I right? Thank you
[TABLE="class: grid, width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]phone#[/TD]
[TD="width: 64"]address[/TD]
[TD="width: 64"]age[/TD]
[/TR]
[TR]
[TD]john[/TD]
[TD]1[/TD]
[TD]1 main st[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]mary[/TD]
[TD]2[/TD]
[TD]3 east ave[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]lary[/TD]
[TD]3[/TD]
[TD]5 west blvd[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]linda[/TD]
[TD]4[/TD]
[TD]7 main st[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]mike[/TD]
[TD]5[/TD]
[TD]11 east ave[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]sue[/TD]
[TD]6[/TD]
[TD]6 main st[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
I have table like below, user will enter age and I want excel to return the name, so I did match/index function like this
=INDEX(A2:D7,MATCH(G4,D2:D7,0),1)
G4 = age
Now if user enter G4 = 40 excel will return john, how can I ask excel to return linda as well. I am thinking it must be array formula, am I right? Thank you
[TABLE="class: grid, width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]phone#[/TD]
[TD="width: 64"]address[/TD]
[TD="width: 64"]age[/TD]
[/TR]
[TR]
[TD]john[/TD]
[TD]1[/TD]
[TD]1 main st[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]mary[/TD]
[TD]2[/TD]
[TD]3 east ave[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]lary[/TD]
[TD]3[/TD]
[TD]5 west blvd[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]linda[/TD]
[TD]4[/TD]
[TD]7 main st[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]mike[/TD]
[TD]5[/TD]
[TD]11 east ave[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]sue[/TD]
[TD]6[/TD]
[TD]6 main st[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]