Copy range from worksheet to new worksheet and rename new worksheet

Phil Smith

Active Member
Joined
Aug 13, 2004
Messages
285
Office Version
  1. 365
Platform
  1. Mobile
Hi all.

I have a Word document which has been saved as a .txt document and then been imported into one worksheet in Excel as a table.

What I would like to do is as follows:

From the last row of data on worksheet "Jobs", variable lastrow, find the first row before it containing "London", variable jobstart.

Cut and paste range cells (jobstart,1),cells (lastrow,6) to new worksheet.

Rename new worksheet as the value in cell (3,3) on the new worksheet.

Repeat and insert new worksheet before the previously newly created worksheet.

Loop through until renamed sheet="600"

Thanks in advance.

Phil
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
As I have had no replies to my original request, I'm just wondering if I made a hash of the explanation. :confused:

So... here is another attempt.

Find last row on Worksheets("Jobs") containing "End" & assign row number to variable lastendrow

Find last row on Worksheets("Jobs") containing "Start" & assign row number to variable laststartrow

Create new worksheet after Worksheet("Jobs")

Cut range (laststartrow,1),(lastendrow,6) from Worksheet("Jobs")

Paste to cells(1,1) on new worksheet

Rename new worksheet from value of cell(3,3) on new worksheet

Delete rows that were just cut from Worksheet("Jobs")

If laststartrow>2 then repeat

Is that any clearer? I know what I want to do, I'm just not always great at the explanation! Sorry!
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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