ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Take a look at my code and tell me what is wrong with this (https://www.excelbanter.com/excel-programming/369324-take-look-my-code-tell-me-what-wrong.html)

yl358[_5_]

Take a look at my code and tell me what is wrong with this
 

I have many word documents (all with the same template), and I am tryin
to extract the info from all the .doc files and compile them into on
Excel database. I have the code done and it works.... but I ran int
one problem: The resulting String values in Excel have weird squar
symbols in them.

Take a look at it in the attachments. I've attached both the .do
template and a general database as a reference.

Please fix my problem: how do I get rid of these square symbols

+-------------------------------------------------------------------
|Filename: POV_HELP.doc
|Download: http://www.excelforum.com/attachment.php?postid=5142
+-------------------------------------------------------------------

--
yl35
-----------------------------------------------------------------------
yl358's Profile: http://www.excelforum.com/member.php...fo&userid=3577
View this thread: http://www.excelforum.com/showthread.php?threadid=56810


yl358[_6_]

Take a look at my code and tell me what is wrong with this
 

oops, here is the excel database attache

--
yl35
-----------------------------------------------------------------------
yl358's Profile: http://www.excelforum.com/member.php...fo&userid=3577
View this thread: http://www.excelforum.com/showthread.php?threadid=56810


ChasAA

Take a look at my code and tell me what is wrong with this
 
More than likely they are chr(10) or chr(13) or both. Check for each
characters ASC value.

ChasAA

"yl358" wrote:


oops, here is the excel database attached


--
yl358
------------------------------------------------------------------------
yl358's Profile: http://www.excelforum.com/member.php...o&userid=35776
View this thread: http://www.excelforum.com/showthread...hreadid=568104



yl358[_7_]

Take a look at my code and tell me what is wrong with this
 

how do I check if the Range has chr(10) or chr(13)?


--
yl358
------------------------------------------------------------------------
yl358's Profile: http://www.excelforum.com/member.php...o&userid=35776
View this thread: http://www.excelforum.com/showthread...hreadid=568104


Tom Ogilvy

Take a look at my code and tell me what is wrong with this
 
Try running this and see if they go away:

Sub ReplaceLittleSquares()
Cells.Replace What:=Chr(10), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
Cells.Replace What:=Chr(13), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub

--
Regards,
Tom Ogilvy


"yl358" wrote in
message ...

how do I check if the Range has chr(10) or chr(13)?


--
yl358
------------------------------------------------------------------------
yl358's Profile:
http://www.excelforum.com/member.php...o&userid=35776
View this thread: http://www.excelforum.com/showthread...hreadid=568104





All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com