![]() |
|
|
|
#1
|
|||
|
|||
|
Uh. I thought perhaps you were unaware that all you have to do is select one cell and click one button. Some people sort using a longer technique. |
|
#2
|
|||
|
|||
|
Hi,
I am more a "formula expert", but I looked around a little, stole some code and modified it ![]() Here we go: Right click the sheet tab. Select "View code". Paste the code below. Modify sort column if wanted (A1 at the moment). Leave with Alt+Q. Done! Kind regards Bjorn Private Sub Worksheet_Change(ByVal Target As Range) 'Sort this sheet by column A 'Written by OzGrid Business Applications 'www.ozgrid.com 'small modification by Bjorn 2010-10-02 On Error Resume Next Application.EnableEvents = False Me.UsedRange.Sort _ Key1:=[A1], Order1:=xlAscending, Header:=xlYes, Orientation:=xlSortColumns Application.EnableEvents = True On Error GoTo 0 End Sub |
|
#3
|
|||
|
|||
|
Quote:
No luck, man. Maybe it's because I didn't change the sort column (How do I?), but upon opening and closing, all the data remains the same. |
|
#4
|
|||
|
|||
|
Hi,
try replacing A1 with C1 in the macro, since you like to sort column C (which contains the supplier). Kind regards Bjorn |
|
| Tags |
| macro, sort |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Sorting question
|
markg2 | Excel | 4 | 01-25-2010 03:13 PM |
| automatic start of macro + help on writing helper function | vsempoux | Word | 3 | 10-09-2009 03:01 AM |
| Sorting Outlook TO: field | anakeimai | Outlook | 0 | 09-30-2009 06:15 AM |
| Sorting Tasks by Contacts | Bat | Outlook | 0 | 09-24-2007 01:20 PM |
| sheet linking, sorting | nickbfe | Excel | 0 | 05-19-2006 11:00 AM |