Content of some lines in one line including "line break"

UK_GER

New member
Joined
Apr 23, 2016
Messages
30
Reaction score
0
Points
0
Location
GER
Excel Version(s)
2010
Hello together,

I get my data out of SAP. In this case it is longtext. This could look like:

-----------------------
I was there yesterday.
I checked the switch.

I found nothing.
Pls. advise

----------------------

This longtext belongs to a unique number. Lets say 007.

After reading the file in with PQ and doing a lot "do this" and "do that" the table looks like:


----------------------- ------
I was there yesterday. | 007
----------------------- ------
I checked the switch. | 007
----------------------- ------
----------------------------- | 007
----------------------- ------
I found nothing. ----- | 007
----------------------- ------
Pls. advise------------ | 007
----------------------- ------
--------------------- | 007
----------------------- ------

What I'm looking for now is a way to manipulate the data that I get the text in one cell, including all line breaks and the belonging number in the cell next to the text cell.

This would look like:

----------------------- ------
I was there yesterday. | 007

I checked the switch.



I found nothing.

Pls. advise


----------------------- ------

The reason for this: I want to filter for words in the longtext -> and as the result I wan't to see the whole text of the message.
If I have all data line by line I can identify the unique number, but I see only the line that contains the text that equals the parameter value.

To make it easier I add some code:


let
Quelle = {"1,Today is Friday.","1,Friday is nice.","1,Tomorrow then sun will shine.","1,","2,My name is Uwe.","2,I need your help."},
#"In Tabelle konvertiert" = Table.FromList(Quelle, Splitter.SplitTextByDelimiter(","), null, null, ExtraValues.Error)
in
#"In Tabelle konvertiert"


Every idea is welcome.

Thanks
Uwe
 
Try this code. (when you upload the result of this to excel, you have to turn on "line wrapping" on the ribbon to see the correct result)
Code:
let
   Quelle = {"1,Today is Friday.","1,Friday is nice.","1,Tomorrow then sun will shine.","1,","2,My name is Uwe.","2,I need your help.", "3,This is not empty line","3,","3,Above is empty line" },
   #"In Tabelle konvertiert" = Table.FromList(Quelle, Splitter.SplitTextByDelimiter(","), null, null, ExtraValues.Error),
    #"Pogrupowano wiersze" = Table.Group(#"In Tabelle konvertiert", {"Column1"}, {{"Text", each Text.Combine(_[Column2], "#(cr)#(lf)"), type text}})
in
   #"Pogrupowano wiersze

Have a nice weekend :)
 
Hi Bill,

that's amazing.
Thank you very very much.

Have a nice weekend too.

Uwe
 
Back
Top