Hello!
I've been able to get most of my macro pieced together but the problem that I'm having is getting the actual sort to work. I'm sure it's just something that I'm missing and I'm hoping that you guys can help me out. Here's my code:
So far it selects the range that I want it to, but it won't actually sort by color. I just want cells without color to sort to the top the cells with color are in column "O" or 15.
Thanks!
I've been able to get most of my macro pieced together but the problem that I'm having is getting the actual sort to work. I'm sure it's just something that I'm missing and I'm hoping that you guys can help me out. Here's my code:
Code:
Range("A" & ItmLoc & ":" & "P" & ItmLoc).Select
Range(Selection, Selection.End(xlDown)).Select
Sheets(Commodity).Sort.SortFields.Add Key:=Selection.Columns(15), SortOn:=xlSortOnCellColor, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets(Commodity).Sort
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
So far it selects the range that I want it to, but it won't actually sort by color. I just want cells without color to sort to the top the cells with color are in column "O" or 15.
Thanks!