sort data

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

Guest

is there anyway i can sort a set of data automatically each time the data is updated due to a change in previous data. I am using the rank function and need to keep the list of numbers in order? i'm stuck and becoming disillusioned with excel!!
 
Hi Matt

i'm sure its not that bad really :)

if you record a macro (tools / macro / record new macro - save in "this
workbook") that sorts your data as you want and then copy & paste that macro
into the following it should sort automatically every time a change is made
on the worksheet. (to get to the code choose tools / macro / macros - click
on your macro & choose edit .. then just highlight everything between the
lines sub & end sub & copy it)


Private Sub Worksheet_Change() 'this outline needs to be copied and pasted
into the sheet's code module - right mouse click on the sheet tab, choose
view / code and you should be in the right place

Application.ScreenUpdating = False

'post your sorting macro here

Application.ScreenUpdating = True

End Sub


Let us know how you get on - it might require some tweaking depending on
what you mean by updating data etc ...

Cheers
JulieD

matt said:
is there anyway i can sort a set of data automatically each time the data
is updated due to a change in previous data. I am using the rank function
and need to keep the list of numbers in order? i'm stuck and becoming
disillusioned with excel!!
 
Why do you need to sort just to use the RANK function. Maybe if you give us
some details as to what your data is, and what your RANK function does, we can
help you round this stuff.

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

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



matt said:
is there anyway i can sort a set of data automatically each time the data is
updated due to a change in previous data. I am using the rank function and need
to keep the list of numbers in order? i'm stuck and becoming disillusioned with
excel!!
 
Back
Top