ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I re-arrange numbers in a column? (https://www.excelbanter.com/excel-discussion-misc-queries/131512-how-do-i-re-arrange-numbers-column.html)

Cheetah

How do I re-arrange numbers in a column?
 
In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?

Elkar

How do I re-arrange numbers in a column?
 
Insert a helper column next to your column of numbers
In the first cell of this helper column, enter 1, then 2.... fill down as
far as needed
Sort all of your data using the helper column (in descending order)
Delete the helper column

HTH,
Elkar


"Cheetah" wrote:

In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?


Bernard Liengme

How do I re-arrange numbers in a column?
 
How about adding a helper column with numbers 1,2,3... - very easy and quick
to do
Now sort in descending the two columns using the new column as the key
The helper column can be deleted when you are done.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Cheetah" wrote in message
...
In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?




Trevor Shuttleworth

How do I re-arrange numbers in a column?
 
One way, using a macro:

Dim myArray()
Dim i As Long
Dim j As Long

myArray = Range("A1:A" & Range("A65536").End(xlUp).Row)
j = 1
For i = UBound(myArray) To LBound(myArray) Step -1
Range("A" & j) = myArray(i, 1)
j = j + 1
Next 'i

Change the column references as appropriate (A1 and A65536)

Regards

Trevor


"Cheetah" wrote in message
...
In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?




T. Valko

How do I re-arrange numbers in a column?
 
Use a temporary helper column:

Assume your data is in A1:A4

Enter this formula in B1:

=INDEX(A$1:A$4,COUNTA(A$1:A$4)-(ROWS($1:1)-1))

Copy down as needed.

Then you can convert the formulas to constants:

Select the range of formulas in column B.
Goto the menu EditCopy
Then, EditPaste SpecialValuesOK

Then you can get rid of the original data.

Biff

"Cheetah" wrote in message
...
In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?




Cheetah

How do I re-arrange numbers in a column?
 
Thanks Elkar except I want to take that cell and multiply by 1000 so I was
hoping I can them in 1 step e.g. ig my nmbers were in A1..A4 I want to be
able to put them in column B where
cell B1=A4*1000
cell B2=A3*1000
cell B3=A2*1000
cell B4=A1*1000

rgds
jc

"Cheetah" wrote:

In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?


Gord Dibben

How do I re-arrange numbers in a column?
 
=INDEX(A$1:A$4,COUNTA(A$1:A$4)-(ROWS($1:1)-1))*1000


Gord Dibben MS Excel MVP

On Tue, 20 Feb 2007 14:59:41 -0800, Cheetah
wrote:

Thanks Elkar except I want to take that cell and multiply by 1000 so I was
hoping I can them in 1 step e.g. ig my nmbers were in A1..A4 I want to be
able to put them in column B where
cell B1=A4*1000
cell B2=A3*1000
cell B3=A2*1000
cell B4=A1*1000

rgds
jc

"Cheetah" wrote:

In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?



Elkar

How do I re-arrange numbers in a column?
 
In that case, try this formula in B1

=OFFSET($A$1,4-ROW(),0)*1000

Change the 4 to reflect the number of rows you have in column A. Copy the
formula down Column B as far as needed.

HTH,
Elkar


"Cheetah" wrote:

Thanks Elkar except I want to take that cell and multiply by 1000 so I was
hoping I can them in 1 step e.g. ig my nmbers were in A1..A4 I want to be
able to put them in column B where
cell B1=A4*1000
cell B2=A3*1000
cell B3=A2*1000
cell B4=A1*1000

rgds
jc

"Cheetah" wrote:

In a column I have for e.g. numbers
234
111
333
888
but I want to re-arrange them so that the bottom # goes to the top & vice
versa i.e.
888
333
111
234
How do I do this in excel?



All times are GMT +1. The time now is 04:31 AM.

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