Unwanted Square Character in .txt file
assuming you are correct and this is the last cell in the string (no
invisible characters like spaces).
in a cell next to the offensive text put in a formula like
=code(right(A1,1))
Assume the offensive text is in cell A1
this will tell you what the ascii code for the character is.
You could then use this information to do the replace or you could just use
a formula like
=left(A1,Len(A1)-1)
then drag fill this down the column. Select the results, do Edit =Copy
Select the original Data then do Edit=Paste Special and select values.
then delete the column with the formulas.
You could write similar type code.
--
Regards,
Tom Ogilvy
"Robert Christie" wrote in message
...
Hi all
Using XP Windows and XP Office 2002.
I'm using Excel to open a tab delimited .txt file which
is a report from a database.
At the end of each row of fields is a total of the fields
in the row. i.e 1 1 1 3
This total number has a square character on the end.
Is it possible to remove this square character using a
macro.?
I've tried using TrimAll, copying and adding a blank cell
using paste special, but can not remove it.
I tried a find and replace, but the square character is
copied across to the find as a space.
Could I use a macro to copy/select only the numbers to a
helper column along side, copy and paste special values
only then delete the original column,
The Square Character can be deleted manually.
TIA
Bob Christie
|