Move entries from one sheet to another

NewToTheWorld

New Member
Joined
Mar 25, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hey folks,

Looking to see if you guys can help me get this figured out, I'm hoping that there is a way to get data that is entered on one sheet to automatically move to another sheet based on a Yes/No in a column.

Screenshot below, if column O = Yes, then move the data from A through N to the sheet titled "master" which is identical looking to this sheet. Then I'm assuming I duplicate this for all of the other sheets below also?

1648227617661.png
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Will all the data from column A to column N be inserted before "Yes" or "No" is entered in column O? I assume you want to copy the data to the "Master" only if "Yes" is entered. You want to do this for all the sheets. Is this correct? Do you want to move the data or copy it?
 
Upvote 0
Will all the data from column A to column N be inserted before "Yes" or "No" is entered in column O? I assume you want to copy the data to the "Master" only if "Yes" is entered. You want to do this for all the sheets. Is this correct? Do you want to move the data or copy it?
I actually moved it to be the first drop-down list in Column A, followed by the data. Essentially, I would like the data in the row to be moved to the sheet 'Master' if any of the drop downs are selected. For example, if someone selects "Missed" it will be pulled to the Master sheet. The drop downs are "Missed, Overage, Short" I attempted to split the code into those three but It wont run as I thought it would.

Here is what I was using.. I need the target value to be either of the three values in the drop down.

VBA Code:
Private Sub Worksheet_Missed(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row + 1

If Target.Value = "Missed" Then Rows(Target.Row).Copy Destination:=Sheets("Master").Rows(Lastrow)
End If
End Sub
1648232564526.png
 
Upvote 0
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your San Jose sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. This macro will copy the row when you make a selection in column A:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Select Case Target.Value
        Case "Missed", "Overage", "Short"
            With Sheets("Master")
                Target.EntireRow.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
            End With
    End Select
End Sub
If you want to row moved, the macro will have to be modified. Please let me know.
 
Upvote 0
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your San Jose sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. This macro will copy the row when you make a selection in column A:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Select Case Target.Value
        Case "Missed", "Overage", "Short"
            With Sheets("Master")
                Target.EntireRow.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
            End With
    End Select
End Sub
If you want to row moved, the macro will have to be modified. Please let me know.
It's generating an error "Invalid outside procedure".
 
Upvote 0
What do you mean by this?
I have a spreadsheet that I copy and paste into the one I'm referencing, the columns are already pre-populated with the Missing/Overage/Short data. However, it won't automatically move the columns with the referenced action over to the Master automatically. If I go in and delete the line, then re-select Overage it will move. Even though it said it previously.
 
Upvote 0

Forum statistics

Threads
1,215,360
Messages
6,124,493
Members
449,166
Latest member
hokjock

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