Hi guys
I'm having trouble with the finishing touches of my macro. I have a code that identifies if there is is a text in a certain cell & if there is then the macro copies & pastes the whole column of the cell that has the data into another sheet.
But I plan on adding new columns of data in my original sheet. So when I click the button for the below macro, I dont want it to delete my previous entries. Basically I want to keep a record of all archived data.
Does that make sense?
Sub movedata()
Dim i As Long
Dim WB2 As Worksheet: Set WB2 = Sheets("New")
Dim WB3 As Worksheet: Set WB3 = Sheets("Archive")
For i = 1 To 14
With WB2
If Application.WorksheetFunction.IsText(.Cells(39, i)) Then
.Range(.Cells(3, i), .Cells(39, i)).Copy Destination:=WB3.Cells(2, i)
End If
End With
Next i
Sub DeleteNew()
Dim i As Long
Dim WB2 As Worksheet: Set WB2 = Sheets("New")
For i = 1 To 13
With WB2
If Application.WorksheetFunction.IsText(.Cells(39, i)) Then
.Range(.Cells(13, i), .Cells(39, i)).EntireColumn.Delete
End If
End With
Next i
Bookmarks