Skip to content

Instantly share code, notes, and snippets.

@takurx
Created April 13, 2018 00:37
Show Gist options
  • Save takurx/ec25f31e9d046553e91948a54d66b8b3 to your computer and use it in GitHub Desktop.
Save takurx/ec25f31e9d046553e91948a54d66b8b3 to your computer and use it in GitHub Desktop.
copy to sheet2 from sheet1
Sub copy_sheet2sheet()
'
' copy_sheet2sheet Macro
' copy to sheet2 from sheet1
'
Application.Goto Reference:="copy_sheet2sheet"
Dim i As Integer
Dim j As Integer
Dim col_start As Integer
Dim row_start As Integer
Dim col_end As Integer
Dim row_end As Integer
col_start = 1 'minimum of column
row start = 1 'minimum of row
col_end = 10 'maximum of column
row_end = 20 'maximum of row
For i = col_start To col_end
For j = row_start To row_end
Worksheets("Sheet2").Cells(i, j) = Worksheets("sheet1").Cells(i, j)
Next j
Next i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment