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.
JeffMarkPhil
Height194
175166
Weight817660
JeffJimMarkPhil
Height194175166
Weight817660
JessJimMarkPhil
Height194175166
Weight817660

<tbody>
</tbody>

Any help would be much appreciated :)

Thanks
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,080
Office Version
365
Platform
Windows
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
 

Cranners

New Member
Joined
Jun 17, 2019
Messages
5
The primary table is more like below

NameCityLevel
JeffPerth5
MarkLondon2
PhilNew York4

<tbody>
</tbody>

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,


NameCityLevel
JeffPerth5
Jim
Mark
London2
PhilNew York4

<tbody>
</tbody>

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! :)
 

Cranners

New Member
Joined
Jun 17, 2019
Messages
5
Be better frame and contextualize this questions:
Hi,
I have data in a primary table structured like below:

NameCityLevel
JeffPerth5
MarkLondon2
PhilNew York4

<tbody>
</tbody>



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


JeffMarkPhil
Height194175166
Weight817660

<tbody>
</tbody>


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:


NameCityLevel
JeffPerth5
Jim
MarkLondon2
PhilNew York4

<tbody>
</tbody>


The second table, will react like below:


JeffJimMarkPhil
Height194175166
Weight817660

<tbody>
</tbody>


Instead of what I'm currently getting below:


JeffJimMarkPhil
Height194175166
Weight817660

<tbody>
</tbody>



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 :) :)
 

Watch MrExcel Video

Forum statistics

Threads
1,102,695
Messages
5,488,341
Members
407,634
Latest member
ps01

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top