Moving data from one sheet to anotheronly if its updated in a third sheet?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
I have 3 sheets,
Data Now,
Data Start
Data Old.

All are set up the same. with data in the same rows and columns so if row 20 is client A its client A in all of them.

now heres what i need,
I want a macro that when run checks sheet "Data Now" down colum D and finds any dates that are "today()"
It then goes to sheet "Data Start" and copies Range "B:AY" of that row into "Data Old" in the same row, updatng the data.
then does the next row ect. there might be blank rows and we need to skip these if possible.

Please help f you can thank Tony
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try:
Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Dim LastRow As Long, rng As Range, srcWS As Worksheet, desWS As Worksheet
    Set srcWS = Sheets("Data Start")
    Set desWS = Sheets("Data Old")
    LastRow = Sheets("Data Now").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Sheets("Data Now").Range("D1:D" & LastRow).AutoFilter Field:=1, Criteria1:=Date
    For Each rng In Sheets("Data Now").Range("D2:D" & LastRow).SpecialCells(xlCellTypeVisible)
        srcWS.Cells(rng.Row, 2).Resize(1, 50).Copy desWS.Cells(rng.Row, 2)
    Next rng
    Sheets("Data Now").Range("D1").AutoFilter
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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