Hey guys,
So I have this code here written that takes the selected area and copies it for me based off the cells that I want the values from. How do I check to see if the values that are being copied already exist to where they are being pasted to.
As an example lets say its coping John (Cell F), and 29 (Cell Q)
Its going to post at the first empty cell of text from B39 from top down. How can I get it to check above the first empty cell to see if John is already listed and 29 is already listed?
Have I taken the wrong approach on this?
Sub Completed() Dim datasheet As Worksheet Dim reportsheet As Worksheet Dim finalrow As Integer Dim i As Integer 'row counter Set datasheet = Sheet1 Set reportsheet = Sheet1 datasheet.Select finalrow = Range("E" & Rows.Count).End(xlUp).Row For i = 2 To finalrow If Cells(i, 17) <> "" And Cells(i, 17) <> "Completed Date" Then Application.Union(Cells(i, "F"), Cells(i, "Q")).Copy reportsheet.Select Range("B39").End(xlUp).Offset(1, 0).PasteSpecial xlPasteFormulasAndNumberFormats datasheet.Select End If Next i reportsheet.Select Range("B2").Select End Sub
Bookmarks