ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting a linked list (https://www.excelbanter.com/excel-discussion-misc-queries/167746-sorting-linked-list.html)

scottkinsey

Sorting a linked list
 
I would like to be able to sort a set of rows and its linked list. For
example:

A B C ...
1 1 MsgProcessor 450
2 2 DisplayMgr 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

I am hoping there is a way to sort rows 1-4 by col B, and then sort rows
7-10. But the numbers in col A of rows 7-10 get mixed up. For instance, A7
contains '=A1', so when I sort rows 1-4 the number changes, and then the
cells do not match. I've tried absolute and relative references, but nothing
has worked.

Any ideas ?

Chip Pearson

Sorting a linked list
 
I don't really understand what you're looking for, but perhaps the INDIRECT
function would be useful. Instead of =A1, use =INDIRECT("A1").


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"scottkinsey" wrote in message
...
I would like to be able to sort a set of rows and its linked list. For
example:

A B C ...
1 1 MsgProcessor 450
2 2 DisplayMgr 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

I am hoping there is a way to sort rows 1-4 by col B, and then sort rows
7-10. But the numbers in col A of rows 7-10 get mixed up. For instance,
A7
contains '=A1', so when I sort rows 1-4 the number changes, and then the
cells do not match. I've tried absolute and relative references, but
nothing
has worked.

Any ideas ?



scottkinsey

Sorting a linked list
 
As further explanation, if you create a spreadsheet exactly as shown below,
then sort rows 1-4 by column B you'll get:

A B C ...
1 2 DisplayMgr 450
2 1 MsgProcessor 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

And now the second list, no longer matches the first list. (I can easily
correct the numbering in Col A.)

If I add a reference to the key field (col B in this case) in the second
list, whether I use relative or absolute references, it will not work to sort
the first list. The only way that works is to copy the value of the key
field. But this is not the automated route I am hoping for.

I tried the INDIRECT formula as suggested, but it did not solve my problem.

"Chip Pearson" wrote:

I don't really understand what you're looking for, but perhaps the INDIRECT
function would be useful. Instead of =A1, use =INDIRECT("A1").


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"scottkinsey" wrote in message
...
I would like to be able to sort a set of rows and its linked list. For
example:

A B C ...
1 1 MsgProcessor 450
2 2 DisplayMgr 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

I am hoping there is a way to sort rows 1-4 by col B, and then sort rows
7-10. But the numbers in col A of rows 7-10 get mixed up. For instance,
A7
contains '=A1', so when I sort rows 1-4 the number changes, and then the
cells do not match. I've tried absolute and relative references, but
nothing
has worked.

Any ideas ?



scottkinsey

Sorting a linked list
 
Ooops - forgot to show that row 4 would be sorted before row 3.

"scottkinsey" wrote:

As further explanation, if you create a spreadsheet exactly as shown below,
then sort rows 1-4 by column B you'll get:

A B C ...
1 2 DisplayMgr 450
2 1 MsgProcessor 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

And now the second list, no longer matches the first list. (I can easily
correct the numbering in Col A.)

If I add a reference to the key field (col B in this case) in the second
list, whether I use relative or absolute references, it will not work to sort
the first list. The only way that works is to copy the value of the key
field. But this is not the automated route I am hoping for.

I tried the INDIRECT formula as suggested, but it did not solve my problem.

"Chip Pearson" wrote:

I don't really understand what you're looking for, but perhaps the INDIRECT
function would be useful. Instead of =A1, use =INDIRECT("A1").


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"scottkinsey" wrote in message
...
I would like to be able to sort a set of rows and its linked list. For
example:

A B C ...
1 1 MsgProcessor 450
2 2 DisplayMgr 500
3 3 UserPrefs 327
4 4 TestSim 402
5
6 Change Description
7 1 Need to change MsgProcessor ....
8 2 Update display with new data
9 3 Insert new user preference
10 4 Rerun test simulator

I am hoping there is a way to sort rows 1-4 by col B, and then sort rows
7-10. But the numbers in col A of rows 7-10 get mixed up. For instance,
A7
contains '=A1', so when I sort rows 1-4 the number changes, and then the
cells do not match. I've tried absolute and relative references, but
nothing
has worked.

Any ideas ?




All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com