Sunday, April 2, 2017

How I figured out what invisible character to cut


  • Copy paste character to own line in Excel
  • Then used function =CODE(targetCellRef)
  • Then used: =TRIM(SUBSTITUTE(A4,CHAR(202),CHAR(32)))
  • https://support.office.com/en-us/article/Remove-spaces-and-nonprinting-characters-from-text-023f3a08-3d56-49e4-bf0c-fe5303222c9d
To get it working in VBA script I used:

temp1 = WorksheetFunction.Substitute(Rng.Value, Chr(202), Chr(32))

Rng.Value = VBA.Trim(temp1)

Modified from:

No comments: