Do i need Vlookup or Indirect or something else?

MICHAELSNOWDON

New Member
Joined
Nov 14, 2019
Messages
8
I have a simple workbook with two sheets.

Sheet 1 contains:

[TABLE="width: 256"]
<tbody>[TR]
[TD="class: xl63, width: 64"]NAME[/TD]
[TD="class: xl63, width: 64"]AGE[/TD]
[TD="class: xl63, width: 64"]HEIGHT[/TD]
[TD="class: xl63, width: 64"]WEIGHT[/TD]
[/TR]
[TR]
[TD]JOHN[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]52[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD]PETER[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]62[/TD]
[/TR]
[TR]
[TD]LUCY[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]86[/TD]
[/TR]
[TR]
[TD]DANIEL[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]42[/TD]
[TD="align: right"]34[/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2 contains a message: Choose a person
I then has a dropdown/combo box (data validation list, the source being the list of names from sheet 1)

So sheet 2 looks like:

[TABLE="width: 218"]
<tbody>[TR]
[TD]Choose person:[/TD]
[TD]JOHN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Age[/TD]
[TD="align: right"]=Sheet1!B2[/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD="align: right"]=Sheet1!C2[/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD="align: right"]=Sheet1!D2[/TD]
[/TR]
</tbody>[/TABLE]

But obviously it be dynamic and choose relevant row instead of just row 2.



When user selects a name from the menu, the cells next to age, height and weight on sheet 2 should grab relevant data from sheet 1.

Please help with the formulas I need to do this.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi. Try like this:

=VLOOKUP($B$1,Sheet1!$A$1:$D$5,MATCH(A3,Sheet1!$A$1:$D$1,0),0)

The headers in your lookup table must be the same as the headers in Sheet2 (Age etc.)
 
Upvote 0
One more option
Code:
=INDEX(Sheet1!$A$2:$D$5;MATCH($B$1;Sheet1!$A$2:$A$5);ROW()-1)
 
Upvote 0
Thanks for your suggestions. The problem is, the spreadsheet I have is much more complicated than my example and so the headers cannot be the same. Is there a way of posting attachments on here?
 
Upvote 0
post a link to the shared Excel FILE with representative example of data using googledrive, onedrive , dropbox or any similar
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

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