Assign column values to heading? - Linking Cell Movement

Cranners

New Member
Joined
Jun 17, 2019
Messages
5
Hi!

I want to be able to make cells move together if I change the value of one of the headings. I currently have the heading set up to come from another sheet using a vlookup. When I insert a column on the other sheet, (say, Jim) the second table below is what I get, but what I want to occur is the third table below.[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jeff[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194
[/TD]
[TD]175[/TD]
[TD]166[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD]76[/TD]
[TD]60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Jeff[/TD]
[TD]Jim[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194[/TD]
[TD]175[/TD]
[TD]166[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD]76[/TD]
[TD]60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Jess[/TD]
[TD]Jim[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194[/TD]
[TD][/TD]
[TD]175[/TD]
[TD]166[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD][/TD]
[TD]76[/TD]
[TD]60[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Any help would be much appreciated :)

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Something like in B2 of your new sheet. Copy across and down as required:

=IFERROR(INDEX(Sheet1!$B$2:$D$3,MATCH($A2,Sheet1!$A$2:$A$3,0),MATCH(B$1,Sheet1!$B$1:$D$1,0)),"")

With the primary table in Sheet1!A1:E3
 
Upvote 0
The primary table is more like below

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]City[/TD]
[TD]Level[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]Perth[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]London[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]New York[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

And these Names become the heading of the table in the original post with the formula:
=IFERROR(VLOOKUP(COLUMN()-2,'Sheet1'!$C$5:$F$50,ROW(),0), "")
and dragged across.

So then what I'm trying to achieve is if I add a row to this table,


[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]City[/TD]
[TD]Level[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]Perth[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mark
[/TD]
[TD]London[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]New York[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

The second table (in the original post), will react as in the third table in the original post, whereas what occurs now is in the second table.

Will your solution still work in this context? Sorry I should have gone into more detail initially

Thanks a bunch! :)
 
Upvote 0
Be better frame and contextualize this questions:
Hi,
I have data in a primary table structured like below:

[TABLE="class: cms_table_cms_table, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]City[/TD]
[TD]Level[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]Perth[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]London[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]New York[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]



The names in which, are being input into another sheet using a vlookup, as below:


[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jeff[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194[/TD]
[TD]175[/TD]
[TD]166[/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD]76[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


With the following formula: =IFERROR(VLOOKUP(COLUMN()-2,'Sheet1'!$C$5:$F$50,ROW(),0), "")
dragged across, accounting for small formatting deviations.

What I'm trying to achieve, is if I add a row to my first table, as below:


[TABLE="class: cms_table_cms_table"]
<tbody>[TR]
[TD]Name[/TD]
[TD]City[/TD]
[TD]Level[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]Perth[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]London[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]New York[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]


The second table, will react like below:


[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jeff[/TD]
[TD]Jim[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194[/TD]
[TD][/TD]
[TD]175[/TD]
[TD]166[/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD][/TD]
[TD]76[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]


Instead of what I'm currently getting below:


[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jeff[/TD]
[TD]Jim[/TD]
[TD]Mark[/TD]
[TD]Phil[/TD]
[/TR]
[TR]
[TD]Height[/TD]
[TD]194[/TD]
[TD]175[/TD]
[TD]166[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Weight[/TD]
[TD]81[/TD]
[TD]76[/TD]
[TD]60[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



So, essentially, I want the data below the heading in the second sheet, to move along with the heading if a new Name is added on the first sheet.

Sorry if this is a little confusing to follow

Thanks :smile: :smile:
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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