First time Forum user. The Macro below works but I need for the Key1 Range to be the active cell at column "CD" instead of "CD57". In other words, I am doing all of the sorting on a single row but the row number will vary depending on the row number of the active cell.
Thanks for your help.
Ron
Sub Macro2()
'
' Macro1 Macro
' Update and Calculate
'
' Keyboard Shortcut: Ctrl+x
'
With ActiveCell
Range(Cells(.Row, "BI"), Cells(.Row, "CB")).Select
End With
Selection.Copy
With ActiveCell
Range(Cells(.Row, "CD"), Cells(.Row, "CW")).Select
End With
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With ActiveCell
Range(Cells(.Row, "CD"), Cells(.Row, "CW")).Select
End With
Selection.Sort _
Key1:=Range("CD57"), _
Order1:=xlAscending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal
End Sub
Bookmarks