I am trying to get a range of cells sorted through a Macro by their absolute value, but still display their true value. The values of the cell are pulled via VLOOKUP from another tab. As I couldn't post an attachment, I have included an image of an example of what I'm looking for. I believe a third column must be created to figure out their absolute values, but I'm not sure.
Here is my macro I have which currently sorts it beutifully by true value:
Here is my macro I have which currently sorts it beutifully by true value:
Code:
Range("I22:J25").Select
Range("J22").Activate
ActiveWorkbook.Worksheets("sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("sheet1").Sort.SortFields.Add Key:=Range("J22" _
), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("sheet1").Sort
.SetRange Range("I22:J25")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With