Automatically Sort colums

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to format cells or columns to automatically re-sort?

I'm importing infomation from another file and I'd like to sort from Hich to
low as the numbers change.
 
If your numbers where being entered into Column A,
this formula would *automatically* display them in ascending order in
whichever column you used the formula in:

=SMALL($A$1:$A$100,ROW(A1))

And copy down as needed.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Is there a way to format cells or columns to automatically re-sort?

I'm importing infomation from another file and I'd like to sort from Hich to
low as the numbers change.
 
You could trap every change made on the worksheet and sort each time. Place
the following code in the worksheet module for the sheet into which you will
import your data

Private Sub Worksheet_Change(ByVal Target As Range)

'sorts ascending for Column 1 and Column 2
Me.UsedRange.Sort Key1:=Me.Range(Cells(1, 1).Address),
Order1:=xlAscending, _
Key2:=Me.Range(Cells(1, 2).Address),
Order2:=xlAscending, _
Header:=xlYes

End Sub

Note this sorts every time you change any cell on the worksheet so you may
like to refine it to only work on certain columns.

HTH,
Gareth
 

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

Similar Threads

Automatically Sort Tables 2
Automatic Data Sort? 9
Sorting within Rows 7
Sorting Data Advice please 2
Remove date format? 3
Sorting Automatically 3
Automatic sort of a list. 1
Automatic Sorting 1

Back
Top