Copy Paste From One Sheet To Another That Uses a New Date Every Day

RandyD123

Active Member
Joined
Dec 4, 2013
Messages
289
Office Version
  1. 2016
Platform
  1. Windows
All,

So I have a sheet named "DO Report 10-14-22", and the date changes every day to the current day. Each day it is a completely new file that is saved on IShare. I need to copy the data in this Workbook on the "MR" tab to another workbook in called "Checkpoint Summary 101422" on the "Sheet1" tab. The ranges would always be the same.

Range for "DO Report 10-14-22" is N5:O41 and it will always be that range. This file is on IShare so I would just open it manually and go to the "MR" tab so that sheet is active. Then I need to copy that data without formulas to a Workbook named "Checkpoint Summary 101422". This paste would go into the "Sheet1" tab which would already be open and active. The range on this sheet is "D11:E47".

Both Workbooks change date every day and I always have to use the previous days workbooks. Meaning on 10/14 I need the workbooks from 10/13. I can open both workbooks manually. It would be great to automate the whole thing using path names, but I'll save that for later. Any help would be appreciated. Thank You.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I thought this would work, but no go!!

VBA Code:
Sub CopyPasteToAnotherActiveSheet()
    'Copy data from source sheet
    Sheets("MR").Range("N5:O41").Copy
    'Activate destination sheet
    Sheets("Sheet1").Activate
    'Select destination range
    Range("D11:E47").Select
    'Paste in the destination
    ActiveSheet.Paste
    Application.CutCopyMode = False
End Sub

It errors out on "Sheets("MR").Range("N5:K41).Copy
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

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