title: What is causing Excel Run time error '6' overflow?
body: <p>Please can someone help me to correct my code to eliminate the overflow error I get when there is only one cell that meets the selection criteria in my code below? Cell A4 and down contains a description of a product and cell B4 and down contain a quantity. The intent is to copy the description from A4 to column L as many times as corresponds to the quantity in B4 and to repeat this process as many times as there are product descriptions in column A. This works perfectly when there is more than one description to be copied, but results in an overflow error if A5 downwards are empty. The three macros being called in the code below are - I believe - all innocuous and have only to do with unprotecting this worksheet before the real code starts to run and then to format a range and re-protect the worksheet once done.
  I am pretty decent with Excel formulas, but my coding is weak, so I am hoping the answer is a simple flaw in my code. Many thanks in advance.  </p>
  
  <pre><code>Private Sub Create_NumberList()
  
      Application.ScreenUpdating = False
      Sheets("Selections").Select
      Call UnprotectSelections
      Dim lRow As Long
      Dim x, MyCount As Integer
  
      lRow = Range("A4:B4").End(xlDown).Row
  
      For Each cell In Range("A4:A" &amp; lRow)
          cell.Copy
          MyCount = cell.Offset(0, 8)
  
          Do
              x = x + 1
              Range("L" &amp; x).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                                                                                   :=False, Transpose:=False
              MyCount = MyCount - 1
          Loop Until MyCount = 0
      Next cell
  
      Application.CutCopyMode = False
      Call ProtectSelections
      Call ReformatSelections
  End Sub
  </code></pre>