Creating new tab and adjusting in new tab

RandyLWalkerJr

Board Regular
Joined
Jul 8, 2014
Messages
77
Hello,

The macro I am trying to create will essentially do the following (in this order):

1. Copy the active page into a new tab and make the new tab active
2. Move the values from column m (rows 71-129) to column j (rows 71-129)
3. Delete column k (rows 71-129).4

Here is the kicker and the part that is really throwing me off. I need the vba to be able to account for varying ranges, so that in one instance it is from rows 71-129, and another time from 79-300. Is this possible?

I'm very new to VBAs and all help would be greatly appreciated. Thanks so much in advance
 
The ability to change ranges depends on what identifiers are there to distinguish the information you are trying to manipulate from the rest of the data. Is there some identifier that could tell us where to start and stop data?
 
Upvote 0
The bottom of the range is a sum line. Could that act as an identifier? I could also make it into a different color. What do you recommend in terms of identifiers??
 
Upvote 0
Is the range continuous? Are there spaces before it starts? Is there a Cell that says something at the beginning of the range? identifiers come in many different forms.
 
Upvote 0
There is a thick boarders around each of the ranges. Does that work? If not, I am happy to add any simple identifier.

The cell above the top boarder of the column M range is the range title: "Total Completed And Stored To Date (D+E+F)". The bottom of the range after the boarder is a sum of the range.

Thanks again.
 
Upvote 0
The range title (provided it does not change) can definitely be used. Are there any blank cells after the data? Is the data Continuous? If I find the cell that has "Total Completed And Stored To Date (D+E+F)", can I then look for the next blank cell and that is my range? I'm sure there probably is a way to use borders, but honestly I've never looked into that.
 
Upvote 0
The next cell after the title is the beginning of the range. No blank cell between title and range. There are blank cells throughout the range, however. Is that a problem?
 
Upvote 0
What if I made a bottom title as well. So the range would go from "total completed and stored to date (D+E+F)" and then end with a phrase like "total range M". Would that work???
 
Upvote 0
Do you know the VBA for this? I have been waiting weeks to figure this out, so if you can shed some light, I would be beyond grateful. Thanks
 
Upvote 0

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