Saturday, August 25, 2018

Freres Vs Rothschild. Who is the Deadliest Warrior?

Excel macro : How to swap two rows? Thank you Mice Rickson

See the previous post on how to do macros and bind them to hotkeys (yes, you only have a couple of keys left since M$ only allows CTRL+ …. idiots of Redmond!!)

https://www.ozgrid.com/forum/forum/help-forums/excel-general/76910-swap-switch-2-rows

Sub MikeRickson_Swap()
    Dim tempRRay As Variant
    With Selection
           With Range(.Areas(1), .Areas(.Areas.Count)).EntireRow
                tempRRay = .Rows(1).Value
                .Rows(1).Value = .Rows(.Rows.Count).Value
                .Rows(.Rows.Count).Value = tempRRay
           End With
    End With
End Sub

No comments: