Copying and looping data from one file to another

Closed
dhunited12
Posts
1
Registration date
Monday June 11, 2018
Status
Member
Last seen
June 11, 2018
- Updated on Jun 11, 2018 at 04:59 PM
 Blocked Profile - Jun 11, 2018 at 05:19 PM
In one tab I have information, where I have made it output the information on a second tab (It's more in depth than this but I tried making this as simple as possible)

https://i.stack.imgur.com/J1osO.jpg refer to this as (1)

I want to make another file where every time that (1) is saved, the information from Tab 2 of (1) stacks up in (2) below:

https://i.stack.imgur.com/UTv45.jpg refer to this as (2)

I'm guessing this is Macro based, but I am not sure how to do so.

To clarify, the first time someone saves data to Tab 1 in (1) it's output is sent to Tab 2 in (1). Then I want that data to be saved to the new file, (2), as X Y Z. The next time someone saves the data in (1), I want it to pop up in the new file (2) as A B C. So every time the file is saved, new data forms on the new file, (2).

Thank you in advance.

1 reply

Blocked Profile
Jun 11, 2018 at 05:19 PM
So if we think about it, we really want tab one to be copied, not moved.


Sheets("Sheet1").Select
Sheets("Sheet1").Copy After:=Sheets(1)


OK, I just recorded a macro and its output was:

ActiveWorkbook.SaveAs Filename:="C:\Users\User\Documents\filenamehere.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False


SO there is the file save step.

I did all of this by recording the two macros you described. Now just, polish it up with variable to make it dynamic!


0