Hi Guys--

I am working on a macro and this section has me stumped. The worksheet columns are A:AE. Occasionally, the procedure needs to select a varying number of cells in a row which don't always fall in the same column, count the number of cells in the selection and then paste the data on the row above it, in column ("AE" minus the Selection Count).

Here is what I have so far:

        Cells(Selection.Row, "A").End(xlToRight).Select
  
        Range(ActiveCell, ActiveCell.EntireRow.Cells(1, Columns.Count).End(xlToLeft)).Cut
        
        ActiveCell.Offset(-1, {"AE" - Selection.Columns.Count}).Range("A1").Select
        
        ActiveSheet.Paste
The red-bold bracketed code is the syntax I'm not able to figure out how to phrase.

Can anyone help?

Thanks
Jerry