Move data from one sheet to another automatically

tabauer

New Member
Joined
Apr 11, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am having an issue when i try to move data from a row on sheet 2 to sheet 3 when data is entered into column H on sheet 2. Sheet 3 data needs to compile, not overwrite. I want the data to move once the completion date is input. I want tab 2 to be open work orders and tab 3 our completed tasks.
 

Attachments

  • Sheet 2.png
    Sheet 2.png
    96 KB · Views: 35
  • Sheet 3.png
    Sheet 3.png
    44.3 KB · Views: 35

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Please try the following on a copy of your workbook. Put the code in the sheet module of your "Active Initiatives" sheet. Right click the sheet tab name, select View Code, and put the code in the window that appears on the right of screen.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.CountLarge = 1 And Target.Column = 8 Then
        Application.EnableEvents = False
        If IsDate(Target.Value) Then
            With Target.Rows.EntireRow
                .Copy Sheets("Historical Initiatives").Cells(Rows.Count, 1).End(xlUp).Offset(1)
                .Delete
            End With
        End If
    End If
    Application.EnableEvents = True
End Sub
 
Upvote 0
Solution
@kevin9999 thanks you! that worked perfectly!
Please try the following on a copy of your workbook. Put the code in the sheet module of your "Active Initiatives" sheet. Right click the sheet tab name, select View Code, and put the code in the window that appears on the right of screen.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.CountLarge = 1 And Target.Column = 8 Then
        Application.EnableEvents = False
        If IsDate(Target.Value) Then
            With Target.Rows.EntireRow
                .Copy Sheets("Historical Initiatives").Cells(Rows.Count, 1).End(xlUp).Offset(1)
                .Delete
            End With
        End If
    End If
    Application.EnableEvents = True
End Sub
@kevin9999 Thank you that worked, perfectly!
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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