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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,636
Messages
6,120,668
Members
448,977
Latest member
moonlight6

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