You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can I sort different column data sets in same row?

I want to sort two different data sets in same rows. For example, in the image below, column B is associated with numbers in column C and column E with column F. I want to sort data in column B by data in column C without messing with columns E and F, even though they are on the same row. Is this possible?

Posted on Jul 13, 2019 7:14 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 13, 2019 2:34 PM



Is this possible?

No. At least, Not directly. Numbers sees each row as a 'record' and each column as a 'field' in that record. Records are preserved in a sort of the table.


But you can:

Select the cells (or the full columns) to be included in the sort.

Copy.

Click an empty space on the Sheet.

Paste


Numbers will create a new table containing the copied data.

Sort the new table on the column containing the sort data


Select and Copy the selected data. (both columns—image shows small table after sort, but belore column A is added to the selection)

Click once on the top left cell of the unsorted data in the original table.

Paste.


The sorted data will replace the unsorted version.

Final step: Select and delete the new table (on the right).


Regards,

Barry

3 replies
Question marked as Top-ranking reply

Jul 13, 2019 2:34 PM in response to a2k47



Is this possible?

No. At least, Not directly. Numbers sees each row as a 'record' and each column as a 'field' in that record. Records are preserved in a sort of the table.


But you can:

Select the cells (or the full columns) to be included in the sort.

Copy.

Click an empty space on the Sheet.

Paste


Numbers will create a new table containing the copied data.

Sort the new table on the column containing the sort data


Select and Copy the selected data. (both columns—image shows small table after sort, but belore column A is added to the selection)

Click once on the top left cell of the unsorted data in the original table.

Paste.


The sorted data will replace the unsorted version.

Final step: Select and delete the new table (on the right).


Regards,

Barry

Jul 13, 2019 11:41 PM in response to a2k47

Without rushing, getting from the initial state of your table to the sorted state shown in my last image took less than 30 seconds by my Mac's clock, and would have taken less than that had I thought to select the two columns instead of clicking the first cell, then dragging the mouse to include the rest of the cells.


An alternative would be to Split the six column table into two tables, one containing the current B-C data pairs, the other containing the current E-F pairs.


With the pairs on separate tables, you can sort either set without disturbing the other. No copy/paste or temporary table needed.


Or you could Get an instant and independedt sort of either set of pairs (or both), using a second table and formulas.

Table 1 is used for data entry. columns C and F, on which the two sorts are done, must contain numerical data.

Columns B and C are sorted ascending by the values entered in Table 1.

Columns E and F are sorted ascending by the values entered in column F.


Any change in columns B or E of table 1 is automatically copied in the same column of Table 1A.

Any change in the values in columns C or F causes a resort of that column, and the column to the left of that column in Table 1A.


Entered changes are made ONLY in Table 1. All cells shown with data in Table 1-A are filled by formulas


In the image below, the two cells in Table 1 containing 1 above were edited to contain 3. the two cells containing 3 were edited to contain 9.. Table 1-A was updated automatically.

Formulas on Table 1-A:


C2, and filled down: SMALL(Table 1::C,ROW(cell)−1)

F2 and filled down:  SMALL(Table 1::F,ROW(cell)−1)


This lists the values in column C ( F ) of Table 1 in ascending order in the cells on the same column in Table 1-A.


B2: INDEX(Table 1::B,MATCH(C2,Table 1::C,matching-method),column-index,area-index)

E2: INDEX(Table 1::E,MATCH(F2,Table 1::F,matching-method),column-index,area-index)


Regards,

Barry


Can I sort different column data sets in same row?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.