Stephen_IV
Well-known Member
- Joined
- Mar 17, 2003
- Messages
- 1,168
- Office Version
- 365
- 2019
- Platform
- Windows
What I am trying to do is to bring over all of the data in column O that contains an N if the data in column E is unique. I can bring over all of the data that has an "N" with the code below but I am having trouble bringing over the unique data theat is unique with an N.
In other words if the value in column E is unique and column O contains an N then copy over the entirerow to sheet2.
Thanks in advance Stephen.
Sub pullingdata()
Dim r As Range
Set r = Range("O2:O14204")
For Each cell In r
If cell.Value = "N" Then
cell.EntireRow.Copy Sheets("sheet2").Range("a65536").End(xlUp)(2, 1)
End If
Next
End Sub
In other words if the value in column E is unique and column O contains an N then copy over the entirerow to sheet2.
Thanks in advance Stephen.
Sub pullingdata()
Dim r As Range
Set r = Range("O2:O14204")
For Each cell In r
If cell.Value = "N" Then
cell.EntireRow.Copy Sheets("sheet2").Range("a65536").End(xlUp)(2, 1)
End If
Next
End Sub