title: Remove the commas, spaces and "NULL" string to 0(Zero) from Column
body: <p>I am newbie to Excel VBA. </p>
  
  <p>Need help to removing the commas, spaces and NULL string to "0" from ColumnName called StringName.</p>
  
  <p>First, I have tried to remove the commas, spaces from the ColumnName called StringName and finally to find and replace the "NULL" string to 0(Zero).</p>
  
  <p>Here is the code to Replace for commas, spaces from the ColumnName called StringName.</p>
  
  <pre><code>Sub ReplaceCharacters()
  
    Application.ScreenUpdating = False
      Dim lrow As Long
      lrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
    With ActiveSheet.Range("A2:A" &amp; lrow).SpecialCells(xlCellTypeConstants, xlTextValues).Cells
        .Replace What:=",", Replacement:="", LookAt:=xlPart
        .Replace What:=" ", Replacement:="", LookAt:=xlPart
    End With
  
    Application.ScreenUpdating = True
  
  End Sub
  </code></pre>
  
  <p>I am struggling to find and Replace the string "NULL" to 0 from the ColumnName called StringName.</p>
  
  <p>I need help with this and I have tried a lot and ended up here for a solution.</p>
  
  <p>Here is what I have tried..</p>
  
  <pre><code>' not working
  Sub UpdateWhole()
      With ActiveSheet.UsedRange
      .Replace "NULL", "0", xlWhole
      End With
  End Sub
  
  ' not working
  Sub FormulaRng()
      For i = 2 To 10
         Worksheets("Sheet1").Range("A2:A" &amp; i).FormulaR1C1 = "=IF(A" &amp; i &amp; "=""NULL"",0,A" &amp; i &amp; ")"
      Next
  End Sub
  </code></pre>
  
  <p>Thanks in Advance</p>
  
  <p><a href="https://i.stack.imgur.com/F1pVQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F1pVQ.png" alt="screenshot"></a></p>
  
  <p>Here is the sample data to test</p>
  
  <pre><code>StringName
  ------------------
  NULL
  NULL  
  null 
  nullasdf
  cbgrgNULLdf343
  , asdfwe 4fdt
  456fg , d55nullNULL
  sdf34      df,    4fd   
  NULLfgf  null
  121
  22
  34545
  
  Required OutPut
  ------------------------
  0
  0
  0
  nullasdf
  cbgrgNULLdf343
  asdfwe4fdt
  456fgd55nullNULL
  sdf34df4fd
  NULLfgfnull
  121
  22
  34545
  </code></pre>