title: Treating Blank values in Excel using VBA code
body: <p>I am new to Excel VBA. I have made a macro-enabled Excel to record survey responses. Whenever I run the macro, certain cells get copied (from Sheet1) and stored as a row vector in another worksheet (Sheet2).</p>
  
  <p>The problem is that, if Responder1 has some blank cells in his response, then when I record another response (Responder2), then values corresponding to the variable where Responder1 had blanks, are stored in the previous row.</p>
  
  <p>Here is the VBA code</p>
  
  <pre><code>Sub Submit1()
  Range("A2:C2").Select    #in Sheet1
  Selection.Copy
  Sheets("Sheet2").Select
  Worksheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
  End Submit1
  </code></pre>
  
  <p>Now there are two things that I can think of doing:- </p>
  
  <ol>
  <li>If it is possible to check that if previous row has at least one non-blank entry then the new response will be recorded in next row automatically.</li>
  <li>If above is not possible, can we assign some value for e.g. NULL or 0 to those blank cells, so that the new response can be stored in new row.</li>
  </ol>