Computing.Net > Forums > Database > Automatic Sort sheets in excel 2003 workbook

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatic Sort sheets in excel 2003 workbook

Reply to Message Icon

Name: aevans0001
Date: October 15, 2009 at 16:35:23 Pacific
OS: Windows XP
Product: Microsoft Excel 2003 (full product)
Subcategory: General
Tags: excel, visual basic, sort
Comment:

Ok I am kind of new to this site and have been trying to figure this out for a while...

I need to sort a worksheet in a workbook by the acount number 1st and then by completed date...the cell numbers for these two colums are currently..

i for the account number
M for completed date

Currently I use this formula in VB Scripts

Private Sub Workbook_Open()
Dim c As Range
Set c = Worksheets("Work History").Cells
c.Sort Key1:=c.Range("A1"), order1:=xlDescending, Header:=xlYes
End Sub

This script works to sort the worksheet by account number (if i copy the account number to Column A), but I would rather have it sort column i and M....



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Automatic Sort sheets in excel 2003 workbook

Automatically Sort Excel Worksheet www.computing.net/answers/dbase/automatically-sort-excel-worksheet/525.html

Dynamic functions in Access 2003 www.computing.net/answers/dbase/dynamic-functions-in-access-2003/326.html

Replacing part of a hyperlink www.computing.net/answers/dbase/replacing-part-of-a-hyperlink/514.html