Macros - Copying from One Workbook and Putting It into Another

tac383

New Member
Joined
Jul 22, 2010
Messages
8
I have a file called daily.xls that shows data with the date listed in the first column. I want to move some of this data to a file called things.xls which has the date listed in the first row, with two columns in between each date.

I was thinking I could apply a variable to the first date in things.xls (A1) and then use that to find the same date in daily.xls by going down the column and when they match, populate columns C and E underneath the appropriate date and the column next to it things.xls.

After that had been completed, the variable would change to the next date in things.xls (D1) and the macro would populate any of the data that went along with the date D1 underneath D1 and E1.

To graphically show what I have:
In daily.xls
20110105 w x y z
20110106 s t u v

In things.xls I have the dates and want:
20110105 20110106
x z t v


Any info would be appreciated, because I can't even get a variable to work. Thanks.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Well the formats didn't come out the way I wanted them to, but hopefully you get the point. Thanks.
 
Upvote 0

Forum statistics

Threads
1,216,159
Messages
6,129,210
Members
449,493
Latest member
JablesFTW

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