I'm trying to copy all the cells in a column that contain a text and paste them into a column in another sheet. Here's what I have:
The problem is that this code pastes the same cell over and over again, whereas I want to find one cell, copy it, paste it, and move on to the next one.![]()
Sub PasteSO() Dim var1 As Integer var1 = Application.WorksheetFunction.CountIf(Sheets("D").Range("A1:A300"), "*SO*") Sheets("Sheet1").Range("A1").Value = "SO" For i = 1 To var1 Sheets("D").Range("A:A").Find(What:="SO").Copy Sheets("Sheet1").Columns("A").Find("", Cells(Rows.Count, "A")).PasteSpecial Next i End Sub
Any suggestions?
Bookmarks