ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   data swap (https://www.excelbanter.com/excel-worksheet-functions/199706-data-swap.html)

scott

data swap
 
is it possible to swap cells without having to cut and paste? if i have data
in b3:b5 and c3:c5, and i want the data in each column to switch, is there a
function that allows me to do that?

Mike H

data swap
 
Not without resorting to a macro

Right click the sheet tab, view code and paste this in and run it

Sub swap()
Range("B3:B5").Copy
Range("A65534").PasteSpecial
Range("C3:C5").Copy
Range("B3").PasteSpecial
Range("A65534:A65536").Copy
Range("C3").PasteSpecial
End Sub

Mike

"scott" wrote:

is it possible to swap cells without having to cut and paste? if i have data
in b3:b5 and c3:c5, and i want the data in each column to switch, is there a
function that allows me to do that?



All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com