Adding a KeyID column for sorting

G

Guest

Hi. I'm using MS Windows XP (Home) and Excel 2003. I have a worksheet with
five columns and about 10,000 rows. I intend to do a lot of sorting on these
columns. However, I want to be absolutely certain that the original order is
always maintained (why I'm not using MS Access is a long story -- suffice it
to say that I need to use Excel). So after I do a sort and perform a few
tasks I want to click on a KeyID column and see the original order that I had
before the sorting. Occasionally I will add a few rows of new material --
say between rows 100 and 120, or between 3330 and 3340. Here are my newbie
questions: First, how do I create a KeyID column (so the rows are numbered
[automatically?] from say 1 to 10,000 or to the last row in the worksheet)?
Second, how to I renumber the column when new rows are entered amid the
original worksheet? To repeat: after sorting I want to return to the
original order, so I have to be very careful not to mess things up. Also,
did I read some where that worksheets have a tendency to become somewhat
unstable after many sorts? Could someone please give me some detailed
information about this? Thanks.
 
K

Ken Wright

Assuming you have data in all your rows with no blanks, then insert a column
at the start of your data, in cell A1 put 1, in cell A2 put 2, in cell A3
put 3. Select A1:A3, then hover your mouse over the bottom right of the
cell A3 where you will see a small black cross - Double click this and your
series should automatically extend to the end.

If you add new rows then put a dummy number in the keyfield (anything as
long as it isn't blank) then go back and repeat step 1.

MAKE SURE when sorting that you select ALL the data before sorting, else you
may sort just one of the columns and lose all linkage to the rest of the
data.

Very very safest way is to MAKE A BACKUP COPY NOW, before you do anything
:)
 
R

Ragdyer

I hope the OP didn't mean that rows are inserted *after* the first sort, and
*before* the "return to normal" sort.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
Ken Wright said:
Assuming you have data in all your rows with no blanks, then insert a column
at the start of your data, in cell A1 put 1, in cell A2 put 2, in cell A3
put 3. Select A1:A3, then hover your mouse over the bottom right of the
cell A3 where you will see a small black cross - Double click this and your
series should automatically extend to the end.

If you add new rows then put a dummy number in the keyfield (anything as
long as it isn't blank) then go back and repeat step 1.

MAKE SURE when sorting that you select ALL the data before sorting, else you
may sort just one of the columns and lose all linkage to the rest of the
data.

Very very safest way is to MAKE A BACKUP COPY NOW, before you do anything
:)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

-------------------------------------------------------------------------- --
It's easier to beg forgiveness than ask permission :)
-------------------------------------------------------------------------- --

Rebecca said:
Hi. I'm using MS Windows XP (Home) and Excel 2003. I have a worksheet with
five columns and about 10,000 rows. I intend to do a lot of sorting on these
columns. However, I want to be absolutely certain that the original
order
is
always maintained (why I'm not using MS Access is a long story --
suffice
it
to say that I need to use Excel). So after I do a sort and perform a few
tasks I want to click on a KeyID column and see the original order that
I
had
before the sorting. Occasionally I will add a few rows of new material --
say between rows 100 and 120, or between 3330 and 3340. Here are my newbie
questions: First, how do I create a KeyID column (so the rows are numbered
[automatically?] from say 1 to 10,000 or to the last row in the worksheet)?
Second, how to I renumber the column when new rows are entered amid the
original worksheet? To repeat: after sorting I want to return to the
original order, so I have to be very careful not to mess things up. Also,
did I read some where that worksheets have a tendency to become somewhat
unstable after many sorts? Could someone please give me some detailed
information about this? Thanks.
 
K

Ken Wright

hehehehe - me hopes you are correct :)

--
Regards
Ken.......................


Ragdyer said:
I hope the OP didn't mean that rows are inserted *after* the first sort, and
*before* the "return to normal" sort.
--
Regards,

RD

-------------------------------------------------------------------------- -
Please keep all correspondence within the NewsGroup, so all may benefit !
-------------------------------------------------------------------------- -
Ken Wright said:
Assuming you have data in all your rows with no blanks, then insert a column
at the start of your data, in cell A1 put 1, in cell A2 put 2, in cell A3
put 3. Select A1:A3, then hover your mouse over the bottom right of the
cell A3 where you will see a small black cross - Double click this and your
series should automatically extend to the end.

If you add new rows then put a dummy number in the keyfield (anything as
long as it isn't blank) then go back and repeat step 1.

MAKE SURE when sorting that you select ALL the data before sorting, else you
may sort just one of the columns and lose all linkage to the rest of the
data.

Very very safest way is to MAKE A BACKUP COPY NOW, before you do anything
:)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :)
--------------------------------------------------------------------------
--

worksheet
with on
these order suffice
that
I
had
before the sorting. Occasionally I will add a few rows of new material --
say between rows 100 and 120, or between 3330 and 3340. Here are my newbie
questions: First, how do I create a KeyID column (so the rows are numbered
[automatically?] from say 1 to 10,000 or to the last row in the worksheet)?
Second, how to I renumber the column when new rows are entered amid the
original worksheet? To repeat: after sorting I want to return to the
original order, so I have to be very careful not to mess things up. Also,
did I read some where that worksheets have a tendency to become somewhat
unstable after many sorts? Could someone please give me some detailed
information about this? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top