VBA Codes- move to another tab

Status
Not open for further replies.

jdlerry

New Member
Joined
Apr 6, 2021
Messages
32
Office Version
  1. 2016
Platform
  1. Windows
Hello, I need help please. I am trying to move an entire row to another tab when I change a certain value. If someone can help with the VBA codes please? Here's the dropbox link of the file.https://www.dropbox.com/scl/fi/vzyvunc6dp048z2n9yja5/eMedical-Tracker-updated.xlsx?dl=0&rlkey=u0ptw5jp0xulffbwiqyv9qmrp
1. I will put all the data in the MASTERLIST tab and under ACTION TAKEN/ TO DO, whenever I select an action, the entire row will be deleted and will be moved to another tab.
2. Please refer to INSTRUCTIONS tab for the destination of the data.
3. For example, (refer to she screenshot), whenever I change the data under ACTION TAKE/ TO DO, the entire row 4 will be deleted in the tab and will move to another tab (refer to INSTRUCTIONS tab for the destination)

I badly need help please. Thank you
 

Attachments

  • Capture.PNG
    Capture.PNG
    16.8 KB · Views: 5

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I may be able to help if you provide specific details in words.
I never click on links on this forum.
But there are others here that do click on links and download files
 
Upvote 0
I may be able to help if you provide specific details in words.
I never click on links on this forum.
But there are others here that do click on links and download files
Not sure how to provide the details in words but the dropbox file is the excel sheet of where I will put in the codes.
This was provided to me by an amazing and helpful member here, but is not doing anything when I put it in my excel file.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim strAction As String
Dim rngData As Range
Dim wsDest As Worksheet

Application.EnableEvents = False
On Error Resume Next

If Not Intersect(Range("N4"), Target) Is Nothing Then
Set rngData = ActiveSheet.Range("A4", "V4")
Select Case Target
Case "FOR CASERVICEDESK"

Case "TRIGGERED IN EDP"

Case "REFER TO CON OFF"
Set wsDest = Sheets("CON OFF")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "TERM 1"
Set wsDest = Sheets("TERM 1")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "EMAIL SENT TO CST"
Set wsDest = Sheets("EMAIL SENT TO CST")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "FF-UP EMAIL SENT (CST)"
Set wsDest = Sheets("FF-UP EMAIL SENT (CST)")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "VERIFY WITH SLEC"
Set wsDest = Sheets("VERIFY WITH SLEC")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "RESOLVED"
Set wsDest = Sheets("RESOLVED")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
Case "OTHERS, SEE REMARKS"
Set wsDest = Sheets("OTHERS")
rngData.Copy
wsDest.Range("A" & rowNext(wsDest)).PasteSpecial (xlPasteValues)
rngData.ClearContents
End Select
End If

On Error GoTo 0
Application.EnableEvents = True

End Sub

Function rowNext(ws As Worksheet) As Long
rowNext = ws.Cells(Rows.Count, "A").End(xlUp).Row + 1
End Function
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,443
Messages
6,124,889
Members
449,193
Latest member
ronnyf85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top