strange character appears

skalaima

New Member
Joined
May 2, 2011
Messages
27
I export data from an external program into excel and what is a carriage return in the external program is showing up in excel as "□" (actual version is slightly bigger, what you see here is a "white square" from insert symbol in excel).

The strange part is I can't "re-create" it even though it's visible in excel as "□". When I copy it and try to paste it in excel I get a blank space. When I paste it in MS Word I get a carriage return (manual line break). My goal is to replace all occurences of this strange character with manual line breaks (^l) using find and replace.

Please help... :confused:
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
=clean(a1) will remove them. Then you can copy the formula results and paste values over the original data.
 
Upvote 0
Thanks for the suggestion, but that doesn't quite get me what is needed. Using clean would essentially replace the "□" with a blank space. What I'm looking for is a way to replace that character with a carriage return so the text following it is on the next line.
 
Upvote 0
Actually, CLEAN replaces it with nothing.

If you want to replace the carriage return with a line feed,

=substitute(A1, char(13), char(10))

Then you need to format the cell to wrap text.
 
Upvote 0
That formula would work, if excel would recognize the carriage return. That's where the problem lies though, even though the carriage return (strange looking character) appears in excel it's not being recognized so when I try the substitute formula it doesn't change the contents of the cell because it doesn't pick up the carriage return.

I think this is a unique issue because the data is being imported from an external program and excel is substituting that funny symbol for all carriage returns.

This issue has been driving me crazy all day, any other ideas? (cool formula by the way... didn't know about it, thanks!)
 
Upvote 0
So it's not a carriage return.

Delete all the characters prior to it, and in an adjacent cell, =CODE(A1)

What's that return?
 
Upvote 0
Seems that those symbols are line feed or CHR(10) itself.
Try: Select cells - Right click - Format cells – Alignment tab – Wrap text - Ok
 
Upvote 0
shg: =CODE(A1) gives me "11". Must be a good thing that it actually returned a character value, I was worried it was going to return nothing :eeek:.

ZVI: Thanks for your suggestion, but all the cells are already wrapped. I tried to remove the wrap then select wrap again but that didn't fix the problem.
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

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