Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Using Macro to transpose rows' order

$
0
0

I use this macro to reverse rows but all formula are gone, only numbers are left. Any suggestion? Thanks

Sub TransposeRows()
    Application.ScreenUpdating = False
    iStart = 1
    iEnd = 46
    Do While iStart < iEnd
        vTop = Selection.Rows(iStart)
        vEnd = Selection.Rows(iEnd)
        Selection.Rows(iEnd) = vTop
        Selection.Rows(iStart) = vEnd
        iStart = iStart + 1
        iEnd = iEnd - 1
    Loop
    Application.ScreenUpdating = True
End Sub


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>