title: how to count non empty cells in macro
body: <p>Hi i have come up with a code to open multiple workbooks. The code is </p>
  
  <pre><code>Sub OPEN_hari()
  Dim r As Long
  For r = 1 To 10
      Workbooks.Open Filename:=Sheet2.Cells(r, 1).Value
  Next r
  End Sub
  </code></pre>
  
  <p>But the problem here is if only 3 cells ((1,1) (2,1) (3,1)) has the path of the workbook files, an error message is thrown that coulndt open "" files.
  How can i make this macro to open only the files that are mentioned without error message.
  As i am beginner in this any help is highly appreciated</p>