Hi need assistance with creating vba to Sort. The header for the data is on Row 14, data starts in 15. The first sort is on column D (Type). Once this is sorted I then need to sort based on Column D value = If Col D = LM then I need to sort on Columns D (Type),E (Partner), J (Date). If Col D=TR then sort by D (Type), F (Fitter), E (Partner), J (Date).
This is the code I have but it is not working, no error given:
Worksheets("To Open").Sort.SortFields.Add Key:= _
Range("D15:D66"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
Once I have that formatted I will be able to incorporate the code that I have for the subtotal which is:
Selection.Subtotal GroupBy:=5, Function:=xlAverage, TotalList:=Array(11, _
12, 13, 16, 17), Replace:=True, PageBreaks:=False, SummaryBelowData:=True