Macro to add new data to the RIGHT of existing old data

jleone

New Member
Joined
Mar 2, 2011
Messages
5
I've created a macro that will take data from one spreadsheet and insert it into a certain column in a new spreadsheet. As of now, the macro places the data from the old spreadsheet into column C of the new spreadsheet, by creating a new row inbetween column B and the previous column c (i.e. pushing whatever used to be in column c into column d, etc.) What I would like to do instead is have it insert the data from the old spreadsheet to the right of whatever data is currently in the new spreadsheet. For example, in the new spreadsheet if there's data in column A-F, the macro would insert the set of data in column G. The problem is I don't know how to get the macro to recognize wherever the data ends, so that it will insert the data to the row after that. This way, each day when I run the macro it will keep inserting data to the right, so that when I open the spreadsheet, column A will have the oldest data and as we move across the spreadsheet, the data will be the newer/just entered material.

the reason I want to do this is because my next step is going to be to create a graph using the data. Each column represents a certain day, so I'd like the data to be oldest to newest, so that when I create the graph it will represent the data as it's been moving over time. How it inserts the data now would make the graph inverted.

Any help on VBA coding or methods I could try would be extremely appreciated!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You'll need something like:
Code:
Cells(2, Columns.Count).End(xlToLeft).Offset(0, 1).Paste
May be easier if you posted your current code
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,712
Members
452,939
Latest member
WCrawford

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