title: Count a the number of digits in a cell with VBA
body: <p>I get a spreadsheet but sometimes they dont give me all the digits I need when running my macro.  So i am trying to find a way to count how many digits are in a cell and then use msgbox to tell me to add a digit to the cell.  </p>
  
  <pre><code>If Len(A2) &lt;&gt; 7 Then
  MsgBox ("Add # to the end ")
  Exit Sub
  End If
  </code></pre>
  
  <p>I was also wondering if there is a way to use an input box to add the number to the end of the value in excel.  Like if the numbers are 123456 i can put 7 into the input box and it changes the cell value to 1234567</p>