Excel Concatenate Rows

Hello,
I have data in 3 columns: A, B & C
Column A contains the whole data, Column B contains Seperation 1 & Column D onward  contains compilation as per language.

Please see attached sheet.

I have the values populated in B & C, this is what I am looking to resolve:
When there is a value in Column B they should be separated from column E - I (there are always 5 values)

Next, till the next value is reached in column C, the rows in column A should be concatenated & put from column E to I deepening upon the heading

Please let me know if something is not clear, I have tried to make it as descriptive in the file.

Regards & Thanks,
A
SampleAbbr..xlsx
LVL 11
AcklesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
Could you attach the workbook again but this time add a second sheet that shows what you want to see?
AcklesAuthor Commented:
Martin,
The columns E to I show what I want to achieve
AcklesAuthor Commented:
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

aikimarkCommented:
While I look at your workbook, have a look at my Better Concatenate Function article:
http://rdsrc.us/GOGGgl
Martin LissOlder than dirtCommented:
It looks to me that the concatenated data is already there but it's just in the wrong columns, so what would be wrong with the following?

1. Deleting columns C and D
2. Clearing column A
3. Adding two new columns before column B
aikimarkCommented:
It would be helpful if you posted a workbook with more than a single instance of cells to concatenate.  The use of the first separation isn't entirely clear.

Will there always be sets of five output columns?
Why isn't I4 = "ArchO"?
Is there a space character separator between the concatenated cell data?
AcklesAuthor Commented:
Gentlemen,
I think I have totally misexpressed myself.
Sorry about that, please see newly attached Sample.

The sheet 1 is the original data & in Sheet "Result" I have done the columns manually.

That part is not automated.
AcklesAuthor Commented:
Martin LissOlder than dirtCommented:
As aikimark asked, why isn't cell I4 on the Result sheet "Archo" instead of "OLAr"?
aikimarkCommented:
Also, I don't see any delimiter/separator after the English verbiage.
AcklesAuthor Commented:
I am sorry, but I copied them manually, so it's my mistake.

You are right I should have copied "Archo"

Please find attached the corrected, however as for separator, that text also i had added & must have deleted, please ignore that I just want to know how to put it in that frame....
Corrected.xlsx
aikimarkCommented:
This is a first pass of using the Better Concatenate function.
SampleAbbr.xlsm
aikimarkCommented:
There appears to be some inconsistency in the delimiters used when concatenating the cell contents.  Sometimes it appears that a space character is used as a delimiter and at other times no delimiter character is used.
AcklesAuthor Commented:
Seems pretty close, but I guess still the F has to be split, also in the row 15, the text at the bottom is getting copied from next row...
aikimarkCommented:
Thanks.  I hadn't noticed that the separators were included.
SampleAbbr.xlsm
AcklesAuthor Commented:
Looks great, except for one thing....
What the values are in Column C should be the headings as you see in Row 4.
The 4 values you are picking up in Column F, should be the headings of all the concatenated values.
as you see in image attached...
Screen-Shot-2015-09-04-at-11.20.36-P.png
aikimarkCommented:
At this point, I'm not worried about the headers.  those are relatively easy.
AcklesAuthor Commented:
Mark,
Thanks!
So far it looks good, if you are able to resolve the easy part.

However, please bear in mind that this is just a sample file, the real one has thousands of rows.

Waiting for your answer, please don't spoil your weekend....we can do it on Monday as well
aikimarkCommented:
I'm waiting on you to post a version of the workbook with more than a single set of data.
I'm waiting on you to answer the question about the space separator

Is this worksheet populated from some other source?  If so what does the non-Excel data look like?
AcklesAuthor Commented:
Hi Mark,
Apologies for delay....
The data is saved as Text file from PDF, attached as Abbreviations.txt

Then this file is imported in Excel, attached as Import.xlsx.

In the import.xlsx only thing I have done is deleted the first few rows which are irrelevant & deleted empty rows....

The columns B & onwards I had done manually, so if you can suggest at the end how to get the full stuff would be Awesome!!!

Thanks in advance.
Abbreviations.txt
Import.xlsx
aikimarkCommented:
So, you're not pulling in the documentation for the Swiss Federal Constitution?
https://www.admin.ch/opc/en/classified-compilation/19995395/index.html

What is the URL for the document(s) you are scraping?
aikimarkCommented:
Which of the section(s) are you going after? (Enactments, Forms,)
AcklesAuthor Commented:
Enactments
aikimarkCommented:
What is the first item's code supposed to be in 593?

593      SR/RS 812.214.5
Verordnung vom 22. Juni 2006 über die Gebühren des Schweizerischen Heilmittelinstituts; Heilmittel-Gebüh­renverordnung
OEPT
Ordonnance du 22 juin 2006 sur les émoluments de l’Institut suisse des produits thérapeutiques; Ordonnance sur les émoluments des produits thérapeutiques
OEAT
Ordinanza del 22 giugno 2006 sugli emolumenti dell’Istituto svizzero per gli agenti terapeutici; Ordinanza sugli emolumenti per gli agenti terapeutici
OTPT
Ordinaziun dals 22 da zercladur 2006 davart las taxas da l’Institut svizzer per products terapeutics; Ordina­ziun davart las taxas per products terapeutics
FeeO-Swissmedic
Ordinance of 22 June 2006 on the Fees charged by the Swiss Agency for Therapeutic Products; Therapeutic Products Fees Ordinance
AcklesAuthor Commented:
That is an exception.

SR/RS 812.214.5

OEPT
Ordonnance du 22 juin 2006 sur les émoluments de l’Institut suisse des produits thérapeutiques; Ordonnance sur les émoluments des produits thérapeutiques
OEAT
Ordinanza del 22 giugno 2006 sugli emolumenti dell’Istituto svizzero per gli agenti terapeutici; Ordinanza sugli emolumenti per gli agenti terapeutici
OTPT
Ordinaziun dals 22 da zercladur 2006 davart las taxas da l’Institut svizzer per products terapeutics; Ordina­ziun davart las taxas per products terapeutics
FeeO-Swissmedic
Ordinance of 22 June 2006 on the Fees charged by the Swiss Agency for Therapeutic Products; Therapeutic Products Fees Ordinance
aikimarkCommented:
I know it is an exception.  That was not an answer to my question.

But since we both recognize this entry as problematic, what should be done with it?
AcklesAuthor Commented:
well, to be honest I never went so far....but for the moment just let it be as it is, I mean the one you posted up is fine.
I can manually adjust it
aikimarkCommented:
I can manually adjust it
So, getting close to the output format is good enough?
AcklesAuthor Commented:
Sorry about delay, yes format looks good -
aikimarkCommented:
You will need to add the data for the following:

30  SR/RS 131.233
128 SR/RS 173.713.161


The attached workbook contains both the code and the result.

I didn't base this solution on my earlier formula approach.  Instead, I exported the plain text version from the PDF and used regular expressions to do the parsing after some cleanup.  The plain text export is also uploaded for your testing purposes.

Notes:
* none of the export formats were perfect and clean.  The plain text export was the least imperfect.
* I used "HGebV" as the code for 593
Q_28711379.xlsm
Abk-rzungsverzeichnis-2012plain.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aikimarkCommented:
You should validate these results.
AcklesAuthor Commented:
WOW!!!!!!
Awesome!!!!
AcklesAuthor Commented:
I thank you for all the efforts you have taken & you have all my respect!!!
AcklesAuthor Commented:
I really wish i could understand your code...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.