title: Using wildcards in VBA cells.replace
body: <p>I'm looking to write a function in Excel to add leading zeroes to the octets that make up an IP address: e.g in 172.19.1.17 I want to to change .19. to .019., the .1. to .001., and the .17 at the end to .017. </p>
  
  <p>Te Cells.Teplace function does not seem to accept ? as a wildcard. Also, is there a way I can represent 'end of string' so I'll be able to add leading zeroes to the last octet, .17 in the example above.</p>
  
  <p>Thanks Ian</p>
  
  <pre><code>Cells.Replace What:=".1?.", Replacement:=".01?.", LookAt:=xlPart, _
      SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
      ReplaceFormat:=False
  </code></pre>
  
  <p>This does find "10." "11." "12." etc. but replaces them all with ".01?."</p>