Sorting a table with cell references

aTmb405

New Member
Joined
Feb 22, 2016
Messages
19
I am working with a table that I need to sort, while keeping the data in a row the same. Column A has an array function connected to a different sheet, and based off that sheet, column A can change. When this happens though, the other rows do not stay with the original data. Here's an example:

Let's say this is my table:
[TABLE="width: 260"]
<!--StartFragment--> <colgroup><col width="65" span="4" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 65"]First[/TD]
[TD="class: xl64, width: 65"]x[/TD]
[TD="class: xl64, width: 65"] [/TD]
[TD="class: xl64, width: 65"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Second[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Fourth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Fifth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]

Data in Sheet 1 gets updated and so column A changes and this is what my table looks like now:

[TABLE="width: 260"]
<!--StartFragment--> <colgroup><col width="65" span="4" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 65"]First[/TD]
[TD="class: xl64, width: 65"]x[/TD]
[TD="class: xl64, width: 65"] [/TD]
[TD="class: xl64, width: 65"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Second[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Third[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Fourth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[/TR]
[TR]
[TD="class: xl64"]Fifth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]

(Notice the 'x' did not stay with 'Fourth' and 'Fifth')

This is what I need the table to change to:

[TABLE="width: 260"]
<!--StartFragment--> <colgroup><col width="65" span="4" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 65"]First[/TD]
[TD="class: xl64, width: 65"]x[/TD]
[TD="class: xl64, width: 65"] [/TD]
[TD="class: xl64, width: 65"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Second[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Third[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Fourth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl64"]Fifth[/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"] [/TD]
[TD="class: xl64"]x[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]


Is there a way to do this within a table and keeping Column A's array formula?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Please let me know if this isn't a possibility, or if it's just really simple and I can figure out for myself
 
Upvote 0

Forum statistics

Threads
1,223,727
Messages
6,174,139
Members
452,546
Latest member
Rafafa

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