Excel97 - VBA to swap data in columns or rows
Posted on 2002-04-17
I would like to be able to swap data about quickly.
Say I have data in column C and Column F and I wish the data to swap places. Manually I would cut the data in one column, say col C, temporally park it in a spare column, then cut Col F data and paste in col C. Finally cutting the parked data and pasting into col F.
It would be good if a piece of VBA could automate this process.
The user being asked to specify the two data ranges and then just press a button marked say "Interchange" and the data swaps places. If the VBA could accommodate both rows and columns and even blocks of data (i.e. data covering more than one row or col) then that would be great.