Merge strings in a single column

Range

Board Regular
Joined
Nov 13, 2010
Messages
140
I need a snippet of VBA code to do the following for BOTH tabs on the uploaded spreadsheet. So thats form1 AND form2.


Part 1
1. Search Column A for "***TURN*** [yy]"
2. This cell will need to be edited to insert data from the CORRELATING***FLOP***[xx xx xx] which will be the first instance of ***FLOP***[xx xx xx] ABOVE the searched TURN cell
2. The ***TURN*** [yy] will then have the _flopBracket_ inserted to the cell. So that "***TURN*** [yy]" becomes "***TURN*** [xx xx xx] [yy]"


Part 2
1. Search for ***River*** [zz] within column A
2. Find correlating ***TURN*** [xx xx xx] [yy]
3. Edit corrrelatining turn bracket contents to become [xx xx xx yy]
4. Insert [xx xx xx yy] within ***RIVER*** as so ***RIVER [xx xx xx yy] [zz]


NOTE: [xs] [ys] [zs] will always be different. the contents of these brackets should remain the same in all instances.


Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,045
Messages
6,122,830
Members
449,096
Latest member
Erald

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