View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
KLEBESTIFT KLEBESTIFT is offline
external usenet poster
 
Posts: 5
Default Sort column and take row info with it.

In your post you wrote:

"when I enter 3456 in Column A, it sorts by number (which I want it to
do)"

How is this sort being triggered? If you wrote code to do this sort, you
will need to reference the whole area that is being sorted, not just the
column you want to sort by.

eg.
Range("A31:D34").Sort Key1:=Range("A31"), Order1:=xlAscending

Which will keep the additional information in columns B, C and D on the same
row as the value in column A they correspond with.

"Michaela" wrote:

Ron, Thank you for answering, However, I had already tried that. It didn't
work. The information in the rows is not going to the matching number in
column A. The information is staying put and only the number 4567 and 3456
are moving to different locations (Accending).

"Ron Coderre" wrote:

With
A1:D100
And the information in cells B1:D100 pertain to their respective values in
Col_A

Before sorting A1:A100....Select A1:D100

If you will sort using one of the [sort] buttons..make sure a cell in Col_A
is the active cell, then click the [sort] button

Or
You can use the Excel menu
<data<sort
Select the column to sort on
Click the [OK] button

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Michaela" wrote:

In Exel; is there a way to sort Column A and have the information in each row
follow the change?
For example: A5 has 4567 in Column A, with information about 4567 in
different columns but on the same row.
However, when I enter 3456 in Column A, it sorts by number (which I want it
to do), but it leaves the information about 4567 in that row. I need the
information to correspond with the number in Column A.
Does anyone know how to correct this problem?