I am currently in the process of creating a macro that will swap two ranges on one sheet and then swap the same ranges on a different sheet automatically. The macro works and I am able to swap the first 2 ranges on the first sheet with this macro but then I have to manually enter the second sheet's ranges to swap them. Any thoughts?
Sub Swap()
Dim Rng1 As Range, Rng2 As Range
Dim arr1 As Variant, arr2 As Variant
xTitleId = "Swap"
Set Rng1 = Application.Selection
Set Rng1 = Application.InputBox("1 (Select Range):", xTitleId, Rng1.Address, Type:=8)
Set Rng2 = Application.InputBox("2 (Select Range):", xTitleId, Type:=8)
Application.ScreenUpdating = False
arr1 = Rng1.Value
arr2 = Rng2.Value
Rng1.Value = arr2
Rng2.Value = arr1
Sheets("Sheet 2").Select
xTitleId = "Swap"
Set Rng1 = Application.Selection
Set Rng1 = Application.InputBox("1 (Select Range):", xTitleId, Rng1.Address, Type:=8)
Set Rng2 = Application.InputBox("2 (Select Range):", xTitleId, Type:=8)
Application.ScreenUpdating = False
arr1 = Rng1.Value
arr2 = Rng2.Value
Rng1.Value = arr2
Rng2.Value = arr1
Sheets("Sheet 1").Select
Application.ScreenUpdating = True
Sub Swap()
Dim Rng1 As Range, Rng2 As Range
Dim arr1 As Variant, arr2 As Variant
xTitleId = "Swap"
Set Rng1 = Application.Selection
Set Rng1 = Application.InputBox("1 (Select Range):", xTitleId, Rng1.Address, Type:=8)
Set Rng2 = Application.InputBox("2 (Select Range):", xTitleId, Type:=8)
Application.ScreenUpdating = False
arr1 = Rng1.Value
arr2 = Rng2.Value
Rng1.Value = arr2
Rng2.Value = arr1
Sheets("Sheet 2").Select
xTitleId = "Swap"
Set Rng1 = Application.Selection
Set Rng1 = Application.InputBox("1 (Select Range):", xTitleId, Rng1.Address, Type:=8)
Set Rng2 = Application.InputBox("2 (Select Range):", xTitleId, Type:=8)
Application.ScreenUpdating = False
arr1 = Rng1.Value
arr2 = Rng2.Value
Rng1.Value = arr2
Rng2.Value = arr1
Sheets("Sheet 1").Select
Application.ScreenUpdating = True