Hello,
I'm trying to sort a column from high to low and I have the VBA code for this.
However, because the column to be sorted has formulas, that does not really work. Can you change the VBA so that the sorting would happen on the values of these formulas instead? For the moment I do not wish to change these formulas into values though.
This is the VBA code I have:
I'm trying to sort a column from high to low and I have the VBA code for this.
However, because the column to be sorted has formulas, that does not really work. Can you change the VBA so that the sorting would happen on the values of these formulas instead? For the moment I do not wish to change these formulas into values though.
This is the VBA code I have:
Code:
'Set the range variable to the column you'll be sorting
Set rngP = Range("Q3", Cells(Rows.coUnt, "Q").End(xlUp))
'Store the unsorted data in an array
arr2PUnsorted = rngP.Value
'Sort the range descending, put the sorted data 1 column over
rngP.Sort rngP, xlDescending, Header:=xlNo
rngP.Offset(, 2).Value = rngP.Value