I am looking to select a column, copy it, and paste it on another sheet. I would like to use an inputbox so the user can submit which columns will be copied to the other worksheet (one column at a time). Thanks to anyone who can help or point me in the right direction!
This is the code I came up with which works but it's definitely not best practices.
Dim answer
Dim answer2
Dim answer3
Dim colNum As Integer
Dim colNum2 As Integer
Dim colNum3 As Integer
Dim sh As Worksheet
Set sh = Sheets("Raw Data")
Dim sh2 As Worksheet
Set sh2 = Sheets("Sheet1")
'Copy + paste rep names
answer = InputBox("Enter Column Letter")
colNum = Cells(1, answer).Column
sh.Columns(colNum).Copy sh2.Range("J:J")
'Copy + paste rep scores
answer2 = InputBox("Enter Column Letter")
colNum2 = Cells(1, answer2).Column
sh.Columns(colNum2).Copy sh2.Range("K:K")
'Copy + paste rep method or location
answer3 = InputBox("Enter Column Letter")
colNum3 = Cells(1, answer3).Column
sh.Columns(colNum3).Copy sh2.Range("L:L")
Bookmarks