Define location for Cut and Paste

Deverti

Board Regular
Joined
Sep 5, 2020
Messages
63
Office Version
  1. 365
Platform
  1. Windows
i need to cut the rows inbetween and including W to X and paste them below Z in the example excel file

it needs to be done multiple times and the only way to differenciate Wi, Xi, Yi and Zi i see is each group of them being bound within pagebreaks

this process needs to be repeated roughly 200 times within the same sheet so if it s possible to work this out without loops please let me know

any hints would be great

Filebin :: bin sf32229wl8l8cz4k

Also posted here Define location for Cut-Paste
 

Attachments

  • example.png
    example.png
    19.5 KB · Views: 6
Last edited by a moderator:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi & welcome to MrExcel.
How about
VBA Code:
Sub Deverti()
   Dim i As Long
   Dim Ar As Areas
   
   Set Ar = Range("A:A").SpecialCells(xlConstants).Areas
   
   For i = 1 To Ar.Count Step 2
      Ar(i).EntireRow.Cut
      Ar(i + 1).Offset(Ar(i + 1).Count + 1)(1).Insert
   Next i
   Application.CutCopyMode = False
End Sub
 
Upvote 0
perfection eheh. seems to be doing what i need just fine and great example for me to see dim usage. thanks a bunch^^
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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