Help!

How can I prioritize data automatically?

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Worksheet Functions RSS
Next:  Why do my Label templates no longer show up?  
Author Message
Sabbjl
External


Since: Oct 28, 2009
Posts: 1



PostPosted: Wed Oct 28, 2009 6:41 pm    Post subject: How can I prioritize data automatically?
Archived from groups: microsoft>public>excel>worksheet>functions (more info?)

I am trying to set up a workbook to automatically move older dated items to
the top of my workbook and possibly shade them.
Back to top
ryguy7272
External


Since: Dec 16, 2006
Posts: 62



PostPosted: Wed Oct 28, 2009 10:07 pm    Post subject: RE: How can I prioritize data automatically? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

This tiny macro will auto-sort data in Column C, as well as all data in the
same row in Column A and Column B.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim EndData As Long

If Target.Column <> 3 Then Exit Sub 'Sort is done based on data in
Column C, which is the third column

Application.ScreenUpdating = False

EndData = Cells(Rows.Count, 1).End(xlUp).Row

With Range(Cells(3, 1), Cells(EndData, 3)) 'Sort is done based on data
in Column C, which is the third column
.Sort Key1:=Range("C2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With

Application.ScreenUpdating = False
End Sub

HTH,
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Sabbjl" wrote:

> I am trying to set up a workbook to automatically move older dated items to
> the top of my workbook and possibly shade them.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Worksheet Functions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum