Power Query - Handling multi line cells

DaveyD

New Member
Joined
May 20, 2015
Messages
31
I receive a folder of csv files containing addresses.
Many of these addresses have 2 lines for the addressee (e.g. with a c/o).
I am trying to import all the files into power query so I can make some transformations (including removing duplicates)
However, the cells that have 2 lines are being broken into a different record.
Is there a way I can handle this in power query?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
where are different records or two lines?

csv.jpg
 
Upvote 0
If you enable "Wrap Text" you will see many of them in the EnvelopeName column
The first line is regular, but lines 2-6 are multiline
Line 7-8 are regular
 
Upvote 0
I just realized that when importing the files through power query one at a time, it handles the multi-line fine.
It's only when importing multiple from a folder where the problem begins.
Please duplicate that file and then import from the folder - then you will see the problem.
 
Upvote 0
so in Power Query Editor you've
wrap1.jpg

and you want
wrap2.jpg

if so select this column and use
= Table.ReplaceValue(Previous_Step,"#(lf)"," ",Replacer.ReplaceText,{"EnvelopeName"})
 
Upvote 0
wrap3.jpg

you see duplicates but I don't see any problem :confused:

after use
= Table.ReplaceValue(Previous_Step,"#(lf)"," ",Replacer.ReplaceText,{"EnvelopeName"})
I got
lf.jpg
 
Upvote 0

Forum statistics

Threads
1,226,125
Messages
6,189,133
Members
453,525
Latest member
compugor

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