I have been looking for some time now and I see posts concerning pasting an entire column starting at a specific row, but in my case my column is based on an if statement for a value. I am still an amateur so i'm guessing the answer has to do with setting an i somewhere to find the correct column, but I do not know how to incorporate that in my case. The code below works I just do not know how to copy starting at row 3 instead of using EntireColumn. Thank you for the help and let me know if I left any information out.
Sub ColumnCopy()
For Each cell In ActiveWorkbook.Sheets("Sheet1").Range("B5:AZ3000")
If cell.Value = "Active" Then Cell.EntireColumn.Copy Destination:=ActiveWorkbook.Sheets("Sheet2").Columns(2)
Next
End Sub
Aucun commentaire:
Enregistrer un commentaire