Using Sort in VBA for a Range that Changes
I have a range of cells in VBA that changes each time the code is run. I am trying to write code so that this range is sorted by column F. The problem I am having is that it can only be this specific range of cells. There are other cells underneath this range that I do not want sorted, and this range changes in size. Part of the code is below. This is what I have tried so far with no luck. Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select vtools = Selection ActiveWorkbook.Worksheets("Exceptions Weekly Summary").Sort.SortFields.Add Key _ :=Range