Link to home
Start Free TrialLog in
Avatar of Ackles
AcklesFlag for Switzerland

asked on

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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Could you attach the workbook again but this time add a second sheet that shows what you want to see?
Avatar of Ackles

ASKER

Martin,
The columns E to I show what I want to achieve
While I look at your workbook, have a look at my Better Concatenate Function article:
http://rdsrc.us/GOGGgl
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
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?
Avatar of Ackles

ASKER

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.
As aikimark asked, why isn't cell I4 on the Result sheet "Archo" instead of "OLAr"?
Also, I don't see any delimiter/separator after the English verbiage.
Avatar of Ackles

ASKER

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
This is a first pass of using the Better Concatenate function.
SampleAbbr.xlsm
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.
Avatar of Ackles

ASKER

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...
Thanks.  I hadn't noticed that the separators were included.
SampleAbbr.xlsm
Avatar of Ackles

ASKER

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
At this point, I'm not worried about the headers.  those are relatively easy.
Avatar of Ackles

ASKER

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
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?
Avatar of Ackles

ASKER

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
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?
Which of the section(s) are you going after? (Enactments, Forms,)
Avatar of Ackles

ASKER

Enactments
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
Avatar of Ackles

ASKER

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
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?
Avatar of Ackles

ASKER

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
I can manually adjust it
So, getting close to the output format is good enough?
Avatar of Ackles

ASKER

Sorry about delay, yes format looks good -
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You should validate these results.
Avatar of Ackles

ASKER

WOW!!!!!!
Awesome!!!!
Avatar of Ackles

ASKER

I thank you for all the efforts you have taken & you have all my respect!!!
Avatar of Ackles

ASKER

I really wish i could understand your code...