Hi guys,
Got this code below where ws1/2/3 etc makes reference to my worksheet. All stuff is defined.
This macro looks through column CG and determines which have an "unknown" or "0" value assigned as the result of a formula. It then pastes the corresponding value of column E into a new sheet.Code:Dim i As Long Dim RwCount1 As Long RwCount1 = ws5.Range("F" & Rows.Count).End(xlUp).Row For i = 2 To RwCount1 If ws5.Range("CG" & i).Value = "Unknown" Or "0" Then ws5.Activate ws5.Range("E" & i).Select Selection.Copy ws6.Activate Range("J" & Rows.Count).End(xlUp).Offset(1, 0).Select ActiveSheet.Paste End If Next i Application.ScreenUpdating = True End Sub
Now its doing this fine, but for some reason it is not taking in duplicate values, which is fantastic as it has saved me from writing the code to get rid of duplicates; but does anyone know why it is acting like this?
Thanks




Reply With Quote
