Concatenating Row Contents Until Certain Value is Reached

kaymco

New Member
Joined
Dec 21, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am trying to output concatenated content into defined columns. There are 6 pre-defined columns (see the image below): Requirement Text, Requirement Rationale, Requirement Guidance, Requirement Lessons Learned, Verification Rationale, Verification Guidance, and Verification Lessons Learned.

1640115940194.png


I have the date imported to Excel in the following format:

1640116038049.png


Here you can see that every column header I provided above has a separate row with that title preceding the text. Many times there are multiple rows within these headers that need to be concatenated and then output. I am looking for help on a VBA code or Excel formula that will do the following:

1. Parse the column (Column A).
2. Every time it sees X.* (where X is any letter), it concatenates and outputs the rows below it to a Requirement Text column and only stops once it reaches a Requirement Rationale row.
3. Once it reaches Requirements Rationale row, it does the same thing (concatenates and outputs to a Requirement Rationale column) until it reaches a Requirements Guidance row.
4. Same for Requirements Guidance until we reach a Verification Rationale row.
5. Same for Verification Rationale until we reach a Verification Guidance row.
6. Same for Verification Guidance until we reach a Verification Lessons Learned row.
7. Same for Verifications Lessons Learned until we reach a X.* row OR until we reach a blank (this would represent the end of the data).

To provide another graphic, I'd like to transform the following data of column to the disparate columns while possibly maintaining the requirement name (X.*) the data is associated with though that is not necessary and can be done afterwards. Any help here would be greatly appreciated!

1640116495008.png
1640116515408.png
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,967
Messages
6,175,664
Members
452,666
Latest member
AllexDee

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