Look closely at your original macro."normally", the sort technique is to
establish the sort "keys"(multiples allowed)Then, set the overall range to be
sorted and apply the "keys".
So, if your data is in Columns DA:DBYou'd first define how to sort column DA
(SortFields.Add Key:=Range("DA1:DA7986
I am wanting to use a variable to sort out the two required columns. the
number of rows will change slightly so I need to use a variable. I have
worked out how to return the cell reference and have a standard macro
working Example 1
Example 2 however returns an error can someone please help