0

I've imported a file from text into excel that has a bunch of values struck out using unicode's long stroke overlay. I need to find and replace them all with zero. What function can I use to find these characters?

  • I think you could adapt this approach to either replace or with Find Next , to find each occurence, [Find and replace a special unicode character](https://stackoverflow.com/questions/29946639/find-and-replace-a-special-unicode-character) with i am guessing ChrW(0336) – QHarr Dec 24 '17 at 06:57
  • or Regex way https://stackoverflow.com/questions/37024107/excel-vba-remove-unicode-characters-in-a-string – QHarr Dec 24 '17 at 07:14

1 Answers1

0

Adapting @Jeeped's answer would the following work?

Sub ReplaceLongStrongOverlay()
    With ActiveSheet
        .Cells.Replace what:=ChrW(822), replacement:="0", lookat:=xlPart
    End With
End Sub

Alternatively, you could set up a RegEx pattern such as "[^\u0336]" , you might need to fiddle with this a bit, and with regEx.Global set to True do a find and replace.

QHarr
  • 83,427
  • 12
  • 54
  • 101