Re-order numbers

donman007

New Member
Joined
Oct 12, 2005
Messages
13
Is there a way to take 5 cells that have random numbers in it and re-order them from lowest to highest automatically, A1, A2, A3, A4, A5 have random numbers, I want new results in A6, A7, A8, A9, A10. Example: 5,46,13,23,35 = 5,13,23,35,46
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
A macro way:
Code:
Sub SortCopy()
Dim lastrow As Long
 
lastrow = Range("A" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False

With Sheets("Sheet1").Sort
        .SetRange Range("A1:A5")
        'or this .SetRange Range("A1:A" & lastrow)
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
End With
Range("A1:A5").Cut Destination:=Range("A6")
'or this Range("A1:A" & lastrow).Cut Destination:=Range("A" & lastrow + 1)
 
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Oh man, i wrote that wrong, sorry, what i meant to say was

A1, B1, C1, D1, E1 have random numbers, I want new results in F1, G1, H1, I1, J1. Example: 5,46,13,23,35 = 5,13,23,35,46
 
Upvote 0
Oh man, i wrote that wrong, sorry, what i meant to say was

A1, B1, C1, D1, E1 have random numbers, I want new results in F1, G1, H1, I1, J1. Example: 5,46,13,23,35 = 5,13,23,35,46
Try this...

Entered in F1 and copied across to J1:

=SMALL($A1:$E1,COLUMNS($F1:F1))
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top