Hi there! I had someone here help me out with a macro on this forum. The purpose of the macro was to copy information over to the next available row in the next sheet if the last column, column L, includes the text "Yes". If It states "No" it will not be copied over to the next sheet. I added a few addition columns to both sheets and now the macro is no longer doing anything. I tried to update the macro accordingly but I think I just messed it up further. Could you take a look at the macro below and help me improve it so it can provide the intended functionality? The columns I'd like to be pasted to the next sheet are A-K and the column that states yes or no in it is L. The initial sheet is called "Outreach" and if there is a "Yes" in Column L in "Outreach" it should pull over A-K to A-K in the following sheet "Relationship"
Thank you!
'LRowK = tbl.ListRows.Count + 2
' Find the record
Set rng = Range("Table_Relationship[Influencer]").Find(Influencer, LookIn:=xlValues, lookat:=xlWhole)
Select Case UCase(Answer)
Case "YES"
' if the record is there, delete it and copy the new information in.
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If
' Get the row after the last row with data
LRowK = tbl.ListRows.Count + 2
' Copy the data from source to destination
shS.Range(shS.Cells(RowNum, "A"), shS.Cells(RowNum, "K")).Copy
shD.Cells(LRowK, "A").PasteSpecial xlPasteValues
' Copy the notes
shD.Cells(LRowK, "Q") = shS.Cells(RowNum, "G")
Case "NO"
' Delete the record
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If
End Select
End Sub
Sub clear()
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Bookmarks