VBA Code to copy a range that differs for each sheet and pastes it in a new sheet

Occasional Visitor

I am trying to write a VBA code to copy data from sheet "Data1". I need to copy data from C3 and down to the end (the end differs every time), then create a new sheet titled "Graph" and paste the data into cell A2 and down. The same needs to be done from B3 and down to the same end and then pasted into the "Graph" worksheet into cell E2.


The data in the image titled "Data1 Worksheet" is how the data is obtained. The data in the image titled "Graph Worksheet" is how I need it to end up after copying the data and inserting it into cells A2 and E2. Also, how could I make it automatically populate that top row when it creates the "Graph" Worksheet?


Thank you so much for the help!

Graph Worksheet.PNG

Data1 Worksheet.PNG

0 Replies