Is there a way to offeset the cell selection without using .select? I have a macro that requires a lot of cell offsetting as it runs, but the .select commands are slowing things down to much. I've read a lot about ways to remove .select, but with all the copying and pasting this macro does I don't know how to make it any more efficient.
Simply put, can this be wrote in a more efficient way?
Here's the full code I'm working with
Simply put, can this be wrote in a more efficient way?
Code:
ActiveCell.Offset(1, 0).Select
Here's the full code I'm working with
Code:
Sub Organize_Data()
MSG1 = MsgBox("Are you sure you want to recreate course list? If yes ensure Table is Converted to a Range and Cell Borders are set to 'No Border'.", vbYesNo, "Yadda?")
If MSG1 = vbYes Then
Application.ScreenUpdating = False
Set RNG1 = Range("C11:C" & Range("C11").End(xlDown).Row)
Set RNG2 = Range("E11:E" & Range("E11").End(xlDown).Row)
Set RNG3 = Range("F11:F" & Range("F11").End(xlDown).Row)
Range("D11").Select
Do Until IsEmpty(ActiveCell.Offset(1, 0))
Do Until IsEmpty(ActiveCell.Offset(1, -1))
Selection.Copy
ActiveCell.Offset(1, 0).Select
Selection.Insert Shift:=xlDown
Loop
ActiveCell.Offset(1, 0).Select
If IsEmpty(ActiveCell.Offset(0, -1)) Then
RNG1.Copy
ActiveCell.Offset(0, -1).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 2).Select
RNG2.Copy
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Select
RNG3.Copy
ActiveSheet.Paste
ActiveCell.Offset(0, -2).Select
End If
Loop
Range("D11").Select
Selection.End(xlDown).Select
Do Until IsEmpty(ActiveCell.Offset(1, -1))
Selection.Copy
ActiveCell.Offset(1, 0).Select
Selection.Insert Shift:=xlDown
Loop
Application.ScreenUpdating = True
Else
MsgBox "New Course List not generated"
End If
End Sub