Data Re-arrange after import

DiscoSte

New Member
Joined
Feb 17, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi Folks

I'm after some help if possible. I run an import, and get varying row lengths of data, always seperated by two rows, as per the top table in white. I would like to re-arranage, after import as per the table in grey. I want to copy two entries from the top row of each segment to Column 1 and 2, one cell above the data.

1614539853650.png


Any advice would be greatly appreciated.

Many Thanks.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
VBA Code:
Sub DiscoSte()
   Dim Rng As Range
   
   For Each Rng In Range("E:E").SpecialCells(xlConstants).Areas
      Rng.Offset(-1, -4).Resize(1, 2).Value = Rng.Resize(1, 2).Value
   Next Rng
End Sub
 
Upvote 0
Solution
How about
VBA Code:
Sub DiscoSte()
   Dim Rng As Range
  
   For Each Rng In Range("E:E").SpecialCells(xlConstants).Areas
      Rng.Offset(-1, -4).Resize(1, 2).Value = Rng.Resize(1, 2).Value
   Next Rng
End Sub
Thanks a lot Fluff, very much appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,416
Members
448,960
Latest member
AKSMITH

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