Hi. I am new to VBA and would appreciate some assistance if its not too much trouble. When asked if I can knew macros, my answer was "yes, I can record them and do basic editing". I have been provided with a macro with no comments that appears to be straight programming and I am struggling with a couple of processes. . I get that it is "ignore top row in workbook named test and then it is defining the range as n. Then I get a bit lost on what its doing
row1 = 2
With Workbooks(test).ActiveSheet
For n = 2 To lastrowtest
If .Cells(n - 1, 1) <> .Cells(n, 1) Then
Cells(row1, 1) = .Cells(n, 1)
Cells(row1, 2) = .Cells(n, 2)
Cells(row1, 3) = .Cells(n, 3)
row1 = row1 + 1
End If
Next n
End With
row1 = 2
With Workbooks(test).ActiveSheet
For n = 2 To lastrowtest
If .Cells(n - 1, 1) <> .Cells(n, 1) Then
Cells(row1, 1) = .Cells(n, 1)
Cells(row1, 2) = .Cells(n, 2)
Cells(row1, 3) = .Cells(n, 3)
row1 = row1 + 1
End If
Next n
End With