A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Sub CustomChoices()
Dim ws1 As Worksheet, ws2 As Worksheet
Dim rA As Long, rB As Long, r As Long, N As Long, i As Integer
'This tells us the name of the SOURCE worksheet >>>YES
Set ws1 = Sheets("CustomChoiceSets")
'This tells us the name of the DESTINATION worksheet >>>YES
Set ws2 = Sheets("ChoicesData")
Application.ScreenUpdating = False
'This tells us the FIRST cell in column A of the SOURCE worksheet >>>NO, finds 'the last not empty cell (in column A),' e.g if in column A there is only one value in cell A12 (A1 - A11 are empty) ' then returns 12 If column A is empty returns 1
rA = ws1.Cells(Rows.Count, "A").End(xlUp).Row
'This tells us the LAST cell in column B of the SOURCE worksheet >>>>YES like rA
rB = ws1.Cells(Rows.Count, "B").End(xlUp).Row
'This Counts the number of rows in column A of the DESTINATION worksheet >>> YES like' rA and rB but on ws2 and in column A
r = ws2.Cells(Rows.Count, "A").End(xlUp).Row
'This checks to see if A1 in the DESTINATION worksheet is empty. If not, start pasting in first blank row >>> YES
If ws2.Range("A1") = "" Then N = 1 Else: N = r + 1
'....
For i = 2 To rA
ws1.Cells(i, 1).Copy
ws2.Cells(N, 1).Resize(rB - 1).PasteSpecial xlValues
ws1.Range("B2:B" & rB).Copy
ws2.Cells(N, 2).PasteSpecial xlValues
N = ws2.Cells(Rows.Count, "A").End(xlUp).Row + 1
Next i
'Application.CutCopyMode = False
'Application.ScreenUpdating = True
End Sub
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.... 'take data'
you mean: 'cut data'
from columns B and C??
if so, try this
(first, make a copy...)
Sub MapChoices()
Dim ws1 As Worksheet
Dim rB As Long, rC As Long
Set ws1 = Sheets("MapChoices")
'Application.ScreenUpdating = False
rB = ws1.Cells(Rows.Count, "B").End(xlUp).Row
rC = ws1.Cells(Rows.Count, "C").End(xlUp).Row
ws1.Range("B1:B" & rB).Copy Destination:=ws1.Range("H1")
ws1.Range("B1:B" & rB).ClearContents
ws1.Range("C1:C" & rC).Copy Destination:=ws1.Range("I1")
ws1.Range("C1:C" & rC).ClearContents
'Application.ScreenUpdating = True
End Sub