ApolloCarrierServ
New Member
- Joined
- May 3, 2019
- Messages
- 23
I am trying to create a call sheet that organizes Active Leads. I am wanting to move a customer to a "Do Not Call" sheet if that selection is made. That way I have 2 separate sheets 1 for active leads and 1 for Do Not Call. But If a customer on the Do Not Call sheet changes their mind, I would like to move them back to the active Leads list.
On the Active Leads sheet I have a Data Filter with the selections of "HOT", "Follow Up" or "Do Not Call" in column C. If "Do Not Call" is selected that row of information is moved to the Do Not Call Sheet and deleted from the Active Leads sheet.
I want to be able to do the same from the Do Not Call Sheet if it is changed to "HOT" or "Follow Up". For whatever reason when I try to use the same VBA to move them back to the Active Leads sheet it does not work.
Here is the VBA to move data to the Do Not Call Sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
'If Cell that is edited is in column C and the value is Do Not Call then
If Target.Column = 3 And Target.Value = "Do Not Call" Then
'Define last row on Do Not Call worksheet to know where to place the row of data
LrowDoNotCall = Sheets("Do Not Call").Cells(Rows.Count, "C").End(xlUp).Row
'Copy and paste data
Range("A" & Target.Row & ":P" & Target.Row).Copy Sheets("Do Not Call").Range("A" & LrowDoNotCall + 1)
'Delete Row from Active Leads
Range("A" & Target.Row & ":P" & Target.Row).Delete xlShiftUp
End If
End Sub
Thanks for the help!
On the Active Leads sheet I have a Data Filter with the selections of "HOT", "Follow Up" or "Do Not Call" in column C. If "Do Not Call" is selected that row of information is moved to the Do Not Call Sheet and deleted from the Active Leads sheet.
I want to be able to do the same from the Do Not Call Sheet if it is changed to "HOT" or "Follow Up". For whatever reason when I try to use the same VBA to move them back to the Active Leads sheet it does not work.
Here is the VBA to move data to the Do Not Call Sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
'If Cell that is edited is in column C and the value is Do Not Call then
If Target.Column = 3 And Target.Value = "Do Not Call" Then
'Define last row on Do Not Call worksheet to know where to place the row of data
LrowDoNotCall = Sheets("Do Not Call").Cells(Rows.Count, "C").End(xlUp).Row
'Copy and paste data
Range("A" & Target.Row & ":P" & Target.Row).Copy Sheets("Do Not Call").Range("A" & LrowDoNotCall + 1)
'Delete Row from Active Leads
Range("A" & Target.Row & ":P" & Target.Row).Delete xlShiftUp
End If
End Sub
Thanks for the help!