Cell contents based on another cell data

mattyn

Board Regular
Joined
Apr 20, 2015
Messages
148
Hi All

I have a worksheet that shows a whole load of data summarised in the table below.

Worksheet 1

CodeSub CodeSub Sub CodeDetails
ATitle A
1Sub Title A1
aSub Sub Title A1a
bSub Sub Title A1b
BTitle B
1Sub Title B1
aSub Sub Title B1a
2Sub Title B2
aSub Sub Title B2a
bSub Sub Title B2b
CTitle C
1Sub Title C1
aSub Sub Title C1a
b
Sub Sub Title C1b
<strike></strike>c
Sub Sub Title C1c
<strike></strike>2
Sub Title C2
<strike></strike>
<strike></strike>a
Sub Sub Title C2a
<strike></strike>
<strike></strike>

<tbody>
</tbody>
Now, while this is a master list, I want to create a dynamic (I think) worksheet where I can enter the code (as in A, B or C) into cell A2it self populates the sub codes, sub sub codes and details of all rows pertaining to that code letter. As in as follows:

Worksheet 2

CodeDetail of Code
ATitle AI can pull Title A through by vlookup
Sub CodeSub Sub CodeDetails
1Sub Title A1I don't know how to pull though data here Sub Title A1 etc
<strike></strike>aSub Sub Title B1a
2Sub Title B2
aSub Sub Title B2a
bSub Sub Title B2b

<tbody>
</tbody>

or

CodeDetail of Code
CTitle C<strike></strike>I can pull Title C through by vlookup<strike></strike>
Sub CodeSub Sub CodeDetails
1Sub Title C1
I don't know how to pull though data here Sub Title C1 etc
<strike></strike>aSub Sub Title C1a
bSub Sub Title C1b
cSub Sub Title C1c
2Sub Title C2
aSub Sub Title C2a

<tbody>
</tbody>

In summary, on worksheet 2, I want to enter the code (in cell A2 in this example) and the data from Worksheet 1 (sub code and sub sub code) pulled through in the positions shown. I can pull the data of the title by vlookup (I think)!

Also, I only want to populate rows with data if possible, as there will be static data below these tables on worksheet 2.

Does anyone know if this is possible, and if so, can you please show me how?

My other option is to have a worksheet for every code, and copy & paste the data, but I am hoping I can make it a bit slicker than that.

Very many thanks in advance, and I hope I have explained what I want simply enough!!

Matt
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

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