VBA Code to Copy Dashboard Date Data, Lookup that Date on YTD Data tab, and Paste Value?

SirGruffles

New Member
Joined
Jul 23, 2018
Messages
26
Hello,

In essence, I'm trying to make a macro that reads the data from sheet "Dashboard" that corresponds to a specific date in cell C4 (in this example, focusing on the range of C9:V9), have it lookup that C4 date in column B of "YTD Data" sheet, and if found, Copy/Paste value the contents of the range C9:V9.

I'll try to paste in some images to help illustrate.

In the future, my goal is to load this macro to a button and add a "Refresh All" mechanic at the end, but just trying to get the beginning of this macro done first before I add any bells or whistles.

I'm not sure if there's a way to "futureproof" this macro, in case additional Columns are added or other changes?

Thank you for any help provided.

Thanks,
GR

Below is the goal of what I'm aiming for: to take the data from C9-V9 on the Dashboard tab, lookup the date in C4 on Dashboard, find that date on YTD Data tab, and copy/paste value the contents of C9-V9 into the corresponding row in YTD Data.
1703870689192.png
 

Attachments

  • 1703870659572.png
    1703870659572.png
    40.2 KB · Views: 1

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I have also cross-posted this question here:
The link above also has an example spreadsheet, instead of just images.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,974
Members
449,095
Latest member
Mr Hughes

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