Hi,
Im trying to swap the contents of "B554:W554" with "B555:W555"
I've search but I'm only able to find macro's that swap individual cells.
Anyone know how I can do this?
I've found this macro that swaps entire rows however I require column A to be fixed.
Thanks in advance!Dim tempRRay As Variant Range("B554:W555").Select 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
Hi Papa, perhaps something as simple as this will work?
Sub switchrows() Dim arr1, arr2 arr1 = Range("B554:W554").Value arr2 = Range("B555:W555").Value Range("B554:W554").Value = arr2 Range("B555:W555").Value = arr1 End Sub
Wow, that worked perfectly. Excellent. Thanks!!
Last edited by Paul; 10-26-2010 at 01:50 PM. Reason: Removed quote of full post
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks