VBA to copy data based on Tab name

lxondecks

New Member
Joined
Sep 23, 2020
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I have 2 excel workbooks.
Workbook 1 is generated daily and populated with data for the current day. This is a simple workbook containing 2 columns, with Todays date in Cell A1 and the daily data populated within Cells B3:B43.
Workbook 2 is a compilation of the data for the current year.
Workbook 2 as shown below is comprised of 12 tabs, with each tab containing the data for each month.

I would like to know if there would be a way to copy the daily data from WB1 into the relevant Tab and date fields within WB2.

For example for today, I would need the VBA to copy data from WB1 (Cells B3:B43) into WB2 within the "Oct 2020" Tab and Day 28 (Column AC, rows 3:43)
The issue I am having is finding a piece of code that will find and activate the correct tab in WB2 based on the date of the daily data located within WB1

I would appreciate any advice anyone can offer on this.

Thanks

Lee

WB2
sheet1.PNG
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Watch MrExcel Video

Forum statistics

Threads
1,129,475
Messages
5,636,546
Members
416,923
Latest member
jarri

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
Top