ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove last character from all data (https://www.excelbanter.com/excel-programming/412473-remove-last-character-all-data.html)

JR

Remove last character from all data
 
I have a report that a system is auto generating. The report adds
some kind of character at the end of each entry that I need a macro
that can be run to remove it from ALL data in the spreadsheet. It is
not a space as doing a replace on space with nothing doesn't get rid
of it. The easiest way would be to just parse the whole spreadsheet
removing the last character from the whole spreadsheet as it's that
way everywhere so removing the last character would not damage the
data. Any help with this?

Thanks.

JR

JR

Remove last character from all data
 
Figured it out:

Sub fixme()
Selection.Replace What:=Chr(160), Replacement:="", LookAt:=xlPart,
_
SearchOrder:=xlByRows, MatchCase:=False
End Sub




All times are GMT +1. The time now is 09:21 PM.

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