Hello! I'm very new to macros, but I'm trying to do something that I'm afraid might not be possible. Can someone help me?
Here's what I'm trying to do:
I have a large workbook with many tabs filled with data. Once I finish updating the data each week, I copy some of it into a separate tab filled with Historic Data. That tab has rows labeled by dates so I can go back and see the data each week going back a year or two. The data I pull (copy/paste) comes from 4 different lines in 2 different tabs.
Here's what I've gotten so far:
1. The macro goes to Tab A and copies the correct date (which I have edited before saving the new document for that week).
2. The macro then goes to Tab C (historic data), and highlights the columns where my first piece of historic data should go.
3. The macro pulls up the find window and pastes the date from the previous tab. Then it can find that date (which is already on there because I filled those out months out).
(The idea here is that I'm telling it to search for today's date so that I can be sure to place today's data into the right row.)
4. Finally, the macro hits tab to go to the next cell, which is empty and waiting for the historic data to be filled in.
***Everything up to this point WORKS!*** (And I'm very proud of myself for figuring out how to get that far).
Here's my issue. I now need to tell the macro to actually *select* the targeted cell. When I try to go back and copy/paste into that tab, it pastes it at the top of the page because technically, that cell is just "found" but not targeted. Part of the issue might be that I had to select multiple columns so those are the "cells" that are currently selected. And I can't skip that step, because there are 3 different cells with the right date on that tab for 3 of the 4 pieces of data and I need to make sure that each line of data goes in the right spot. I can't just tell the macro to target a specific cell, because the correct cell will change every week as I have to enter data in the line below the previous one. So... I'm stumped.
Have I confused people? I'm open to suggestions!
(I have only started to learn basic recording of macros, but if anyone can point me in the direction of how to actually program that little detail into the visual basic, I'll be happy with that, too).
Edit: Sorry, here's a copy of the document (edited to take out sensitive info). I'm trying to tell it to take one block of data from the "Report" tab and 3 lines of data from the "Prices" tab and put them into various places on the "Historic Data" tab. They data is highlighted or bordered in light blue, with comments explaining where each one needs to go.
Does this help? I'm sorry if it's confusing!
Bookmarks