I have a spreadsheet with rows of variable length where the last cell
with data in each row is not always the same column. I want to move
the last cell value in each row so that it is in the same column for
each row. (Also, every other row is blank.)
Here's what I have:
Sub MovingFinalValue()
'
' MovingFinalValue Macro
'
Dim LastValueCol As Single
LastValueCol = Cells(1, Columns.Count).End(xlToLeft).Column
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = lastrow To ActiveCell.Row Step -2
Range(LastValueCol).Select
Selection.Cut
Range("Y:1").Select
ActiveSheet.Paste
Next
'
End Sub