Auto Data Sort Query

allen9315

New Member
Joined
May 6, 2017
Messages
2
Hi

I'm struggling to sort a 'sheet' of Data.

The sheet is a direct 'copy' of the master data (therefore Cell A2 in this sheet (sheet2) is {+sheet1:a2} etc, as I do not wish to auto sort the master data.

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]PRODUCT[/TD]
[TD="align: center"]UNIT[/TD]
[TD="align: center"]TOTAL[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]2[/TD]
[TD]Becks[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]-15[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]2[/TD]
[TD]Budweiser[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]2[/TD]
[TD]Stella[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]2[/TD]
[TD]W.K.D.[/TD]
[TD="align: center"]-2[/TD]
[TD="align: center"]-6[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]1[/TD]
[TD]Fosters[/TD]
[TD="align: center"]-6[/TD]
[TD="align: center"]-18[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]1[/TD]
[TD]Guinness[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]8[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]1[/TD]
[TD]Strongbow[/TD]
[TD="align: center"]-9[/TD]
[TD="align: center"]-27[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]3[/TD]
[TD]Bells[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]3[/TD]
[TD]Grouse[/TD]
[TD="align: center"]-1[/TD]
[TD="align: center"]2.5[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]3[/TD]
[TD]Martell[/TD]
[TD="align: center"]-3[/TD]
[TD="align: center"]-9[/TD]
[/TR]
</tbody>[/TABLE]

When the data in the master (sheet1) changes I would like this sheet (sheet2) to auto sort by Column A (Ascending), then Column B (Ascending), then Column E (Descending) to produce the following result :



[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]PRODUCT[/TD]
[TD="align: center"]UNIT[/TD]
[TD="align: center"]TOTAL[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]1[/TD]
[TD]Strongbow[/TD]
[TD="align: center"]-9[/TD]
[TD="align: center"]-27[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]1[/TD]
[TD]Fosters[/TD]
[TD="align: center"]-6[/TD]
[TD="align: center"]-18[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]2[/TD]
[TD]Becks[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]-15[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]2[/TD]
[TD]W.K.D.[/TD]
[TD="align: center"]-2[/TD]
[TD="align: center"]-6[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]3[/TD]
[TD]Martell[/TD]
[TD="align: center"]-3[/TD]
[TD="align: center"]-9[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]3[/TD]
[TD]Grouse[/TD]
[TD="align: center"]-1[/TD]
[TD="align: center"]2.5[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]2[/TD]
[TD]Budweiser[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]2[/TD]
[TD]Guinness[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]8[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]2[/TD]
[TD]Stella[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]3[/TD]
[TD]Bells[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]5[/TD]
[/TR]
</tbody>[/TABLE]


I have attempted to create a VBA Project using several examples found to no avail.

Any help would be very appreciated.

Thanks in advance
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
[TABLE="width: 1161"]
<colgroup><col span="12"><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]colla[/TD]
[TD]collb[/TD]
[TD]PRODUCT[/TD]
[TD]UNIT[/TD]
[TD]TOTAL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/T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D][/TD]
[TD]N[/TD]
[TD]3[/TD]
[TD]Martell[/TD]
[TD]-3[/TD]
[TD]-9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]required[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"]this macro takes a copy of your master table[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]sort a copy of this table[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]places it above left[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]by colla ascending[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]and sorts it as required[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]by collb ascending[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]by total descending[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]Range("M1:Q11").Select[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]this gives[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"] Selection.Copy[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]UNLIKE YOUR EXAMPLE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"] Range("A1").Select[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 8"] Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"] False, Transpose:=False[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]colla[/TD]
[TD]collb[/TD]
[TD]PRODUCT[/TD]
[TD]UNIT[/TD]
[TD]TOTAL[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"] Application.CutCopyMode = False[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]Fosters[/TD]
[TD]-6[/TD]
[TD]-18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 8"] Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]Strongbow[/TD]
[TD]-9[/TD]
[TD]-27[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 8"] , Order2:=xlAscending, Key3:=Range("E2"), Order3:=xlDescending, Header _[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD]W.K.D.[/TD]
[TD]-2[/TD]
[TD]-6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 8"] :=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD]Becks[/TD]
[TD]-5[/TD]
[TD]-15[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]End Sub[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]N[/TD]
[TD]3[/TD]
[TD]Grouse[/TD]
[TD]-1[/TD]
[TD]2.5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]N[/TD]
[TD]3[/TD]
[TD]Martell[/TD]
[TD]-3[/TD]
[TD]-9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]Guinness[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Budweiser[/TD]
[TD]4[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Stella[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD]Bells[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Thanks

Works a treat, after adjusting Range on all Data.

Is it possible for it to 'Autorun' as data changes or do I have to run Macro each time to update ?

That was why I was trying to do it in VBA

Thanks again
 
Upvote 0
I am no good at on event stuff - suggest you start a new post - "run macro when a cell is changed"

but it will run every single time and if you were entering 10 new rows not good.....

maybe on the master sheet a button labelled click me when you have finished adding data....
 
Upvote 0
As oldbrewer wrote Worksheet_Change in your master sheet is triggered when you change a single cell.
If you don't like a macrobutton on it you may pick a column whose cell will be empty (F) and after updating your database select a cell in that column and hit DEL key. It will trigger the event and call your macro.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range([COLOR=#ff0000]"F:F"[/COLOR])) Is Nothing Then

    call YOUR_MACRO_NAME
    
    End If
End Sub
Put this event code in mastersheet.

BTW you won't need to scroll window to reach a button:smile:

Hope this helps and have a nice weekend
 
Upvote 0

Forum statistics

Threads
1,223,719
Messages
6,174,089
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top