title: Use VBA to convert letter case
body: <p>I am writing VBA macro that will convert the string in proper case but with some restriction.</p>
  
  <h2>Beginning text:</h2>
  
  <ol>
  <li>DTest dk;G3Gj</li>
  <li>_dsc0148A</li>
  <li>1pottery2</li>
  <li>Articiart147</li>
  <li>If you don't NEed It</li>
  <li>Pressed_pleasure</li>
  <li>On_The-Floor</li>
  </ol>
  
  <h2>Desired result:</h2>
  
  <ol>
  <li>Dtest Dk;G3gj</li>
  <li>_Dsc0148a</li>
  <li>1Pottery2</li>
  <li>Articiart147</li>
  <li>If You Don't Need It</li>
  <li>Pressed_Pleasure</li>
  <li>On_The-Floor</li>
  </ol>
  
  <h2>Attempt 1:</h2>
  
  <pre><code>Sub ChangePCase()
   rownum = 2
   colnum = 1
  
   ActiveSheet.Range("a2", ActiveSheet.Range("a2").End(xlDown)).Select
  
       For Each Cell In Selection
         mystr = Cells(rownum, colnum).value
  
          Text = WorksheetFunction.Proper(mystr)
          Cells(rownum, colnum + 1) = Text
          rownum = rownum + 1
       Next
  End Sub
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <ol>
  <li>Dtest Dk;G3Gj</li>
  <li>_Dsc0148A</li>
  <li>1Pottery2</li>
  <li>Articiart147</li>
  <li>If You Don'T Neeed It</li>
  <li>Pressed_Pleasure</li>
  <li>On_The-Floor</li>
  </ol>
  
  <p>some characters gets capital after digit or special character.</p>
  
  <p>How I can restrict the characters after special character not to be capital, but if first character of a word is special character then the second character should be capital as the 2nd number.</p>
  
  <h2>Attempt 2:</h2>
  
  <p>My other code Gives some better results but it don't capitalize the second character of a word after special character. Code with output is</p>
  
  <pre><code>Sub Propername()
  rownum = 2
  colnum = 1
  
  ActiveSheet.Range("a2", ActiveSheet.Range("a2").End(xlDown)).Select
  
  For Each Cell In Selection
  
   Text = Trim(StrConv(Cells(rownum, colnum).value, vbProperCase))
   Cells(rownum, colnum + 1) = Text
  rownum = rownum + 1
  Next
   End Sub
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <ol>
  <li>Dtest Dk;k3kj</li>
  <li>_dsc0148a</li>
  <li>1pottery2</li>
  <li>Articiart147</li>
  <li>If You Don't Neeed It</li>
  <li>Pressed_pleasure</li>
  <li>On_the#fl#oor</li>
  </ol>
  
  <p>in second and third 2nd character is not capital while in 6 p of pleasure is also not capital.</p>