Hi all,
I want to copy the values in ranges
G4:G9; G11:G20; G22:G25; G27:G39; G41:G44
to
H4:H9; H11:H20; H22:H25; H27:H39; H41:H44
as you can notice, above are exactly the same size and saw rows, only different columns.
The skpped rows (10, 21, 26, 40) contain subtotal formulas that I want to preserve.
I tried:
Where range2 is the one in H column and range1 is the one in G column but is didn't copy properly. It sort of repeasted some values incorrectly.
What is the correct fastest way in VBA to do above? The ranges above are just partial list. In actual, I got more on each column and in several sheets. I feel that if I do the FOR EACH CELL IN RANGE, the code would take long.
Thanks
I want to copy the values in ranges
G4:G9; G11:G20; G22:G25; G27:G39; G41:G44
to
H4:H9; H11:H20; H22:H25; H27:H39; H41:H44
as you can notice, above are exactly the same size and saw rows, only different columns.
The skpped rows (10, 21, 26, 40) contain subtotal formulas that I want to preserve.
I tried:
Code:
Range("Range2").value = Range("Range1").value
Where range2 is the one in H column and range1 is the one in G column but is didn't copy properly. It sort of repeasted some values incorrectly.
What is the correct fastest way in VBA to do above? The ranges above are just partial list. In actual, I got more on each column and in several sheets. I feel that if I do the FOR EACH CELL IN RANGE, the code would take long.
Thanks