title: Find and replace multiple character in a string VBA
body: <p>I have a large amount of data which i want to replace with the help of macro. I am using code below right now but problem is that it will only replace one value which is D in below code.</p>
  
  <pre><code>Sub Replace()
  
  what = "D"
  replc = ""
  
  Sheets("Sheet1").Select
  
  Cells.replace What:=word, Replacement:=replc, LookAt:=xlPart, _
  SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
  ReplaceFormat:=False
  
  End Sub 
  </code></pre>
  
  <p>My sample data is below. As you can see that some value have alphabetical characters, symbol or combination of character at the end or as a cell value, which i want to replace or remove and also some value will be replaced with other values. I create macro with all possibilities to find the required value and replace it.</p>
  
  <p><strong>0065D</strong>   2089    2797    3270    3315
  <strong>0066D</strong>   2095    2799    3300    3334
  <strong>0067D</strong>   2105    2802    <strong>3582aX</strong>  <strong>a</strong>
  2089    –   2812    3307    3383
  2095    2111    <strong>1164D</strong>   3315    3385
  2105    2112    <strong>1165D</strong>   3334    3400
  2110    2114    2841    <strong>3336F</strong>   3507
  <strong>0771N</strong>   2121    2881    3365    <strong>3515N</strong>
  *<em>0908P</em>*   2130    2883    <strong>3372X</strong>   3548
  <strong>0913P</strong>   2131    2913    3373    3559
  2111    2143    2915    3373    3574</p>
  
  <p>You also notice that there are some lower case characters as well. Right now i was trying to use <strong>IF</strong> condition with <strong>Find</strong> but could not succeed. I am making above macro with every possible condition to replace and run it from another macro which is something like below algo.</p>
  
  <pre><code>IF  find "D"  Then
  
  Run macro "Replace"
  
  Elseif  find "X"
  
  Run macro "Replace"
  
  Elseif  find "F"
  
  Run macro "Replace"
  
  and so on....
  </code></pre>
  
  <p>but if the macro didn't find required character in the sheet then it skips to next step and so on. I want this so bad. I have to perform this replace routine on number of times.</p>
  
  <p>So any help will be appreciated. </p>
  
  <p>Thanks</p>