Code modification

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

Below is a code by Trevor Shuttleworth. This code works
excellent. The only thing I need to know is how to make
this code start putting the data in row 2 of column AD
instead of row 1. How would I do this?


Dim LastRow As Long
Dim i As Long
Dim j As Long

LastRow = Range("AB" & Rows.count).End(xlUp).Row
Columns("AD").Clear
For i = 1 To LastRow
If WorksheetFunction.CountIf(Range("AA:AA"), Range
("AB" & i)) = 0 Then
j = j + 1
Range("AD" & j) = Range("AB" & i)
End If
Next i


Thank you

Todd Huttenstine
 
Dim LastRow As Long
Dim i As Long
Dim j As Long

LastRow = Range("AB" & Rows.count).End(xlUp).Row
Columns("AD").Clear
j = 1
For i = 1 To LastRow
If WorksheetFunction.CountIf(Range("AA:AA"), Range
("AB" & i)) = 0 Then
j = j + 1
Range("AD" & j) = Range("AB" & i)
End If
Next i


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Man that was easy! Im not sure why I didnt do that.
Thank you again.

Todd Huttenstine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top