Basically what is wrong with this
Thanks![]()
For i = 11 To 21 If i Mod 2 = 0 Then Range("A" & i & ":" & "DB" & i) = Range("A" & i-1 & ":" & "DB" & i-1) Next i End Sub
Basically what is wrong with this
Thanks![]()
For i = 11 To 21 If i Mod 2 = 0 Then Range("A" & i & ":" & "DB" & i) = Range("A" & i-1 & ":" & "DB" & i-1) Next i End Sub
You can concatenate the colon and the second range in one string. Like![]()
Range("A" & i & ":DB" & i)
e/ Also I'm assuming you want to take the values of those ranges so it would be:![]()
Range("A" & i & ":DB" & i).Value =
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clickingbelow their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
![]()
Sub test() For i = 11 To 21 If i Mod 2 = 0 Then Range("A" & i) = Range("A" & i).Offset(-1).Resize(, 106) Next i End Sub
Or ...
![]()
For i = 10 To 20 Step 2 With Rows(i).Range("A1:DB1") .Value = .Offset(-1).Value End With Next i
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks