Move variable length ranges to new WS based on a substring

setai25

New Member
Joined
May 30, 2012
Messages
11
I imported a very large flat file dump (187K line) and want to move ranges of cells to a new worksheet if a cell in the range contains a specific sub-string. These strings can appear multiple times in the file dump as well as multiple times within a range/block. So whenever the string appears in a block, move it to the next empty column in the new WS.

The range/blocks can vary from a dozen lines to over 1000. They all begin with two cells of 10 "s" each, followed by a blank cell. The first cell in each range begins with a specific sub-string (ACO: ) and has a sub-string I need to search: either a 7 digit number, or a username. Ideally, I'd like to spawn a new WS named with the sub-string I'm searching by, and moving the blocks to separate columns in that WS.
Even more ideally, if it can run through a named list of values and move the ranges/blocks to new WS's...with each block in a separate column (not asking for a home run, but if anyone is feeling the challenge).

Sample data set:
ColA
ssssssssss
ssssssssss
ACO: web.site.com: 1234567 - user.name1
DataPoint1
DataPoint2
DataPoint3
DataPoint4
DataPoint5
DataPoint11
DataPoint12
DataPoint13
DataPoint16
DataPoint17
ssssssssss
ssssssssss
ACO: web2.site2.com: 1234567 - user.name1
DataPoint1
DataPoint2
DataPoint11
DataPoint12
DataPoint13
DataPoint14
ssssssssss
ssssssssss
ACO: web3.site3.coml: 1236549 - user.name1
DataPoint1
DataPoint2
DataPoint4
DataPoint5
DataPoint9
ssssssssss
ssssssssss
ACO: web4.site4.com: 9876542 - user.name1
DataPoint1
DataPoint9
DataPoint10
ssssssssss
ssssssssss
ACO: web5.site5.com: 9876542 - user.name1
DataPoint1
DataPoint4
DataPoint5
DataPoint9
DataPoint10
DataPoint11
DataPoint15
ssssssssss
ssssssssss

<tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

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