Hi - I know nothing about VB, and need to edit a macro created with Excel. Essentially it has included a specific range of cells despite the fact that they were selected before hitting record. What I need is to apply this macro to whatever cells I have selected at the time, not the ones specified. Any help anyone?
Thanks!!
Code:
Sub OrderByColour()
'
' OrderByColour Macro
'
' Keyboard Shortcut: Ctrl+a
'
ActiveWorkbook.Worksheets(" master").Sort.SortFields.Clear
ActiveWorkbook.Worksheets(" master").Sort.SortFields.Add(Range("G19:G27"), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(146, _
208, 80)
With ActiveWorkbook.Worksheets(" master").Sort
.SetRange Range("A19:DW27")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub