title: selecting data cells with data cells under them
body: <p>is it possible to select cells in excel that are only above cells with data (the cell below the one that needs to be selected needs to have data)? if every cell in a column has data then only the top cell should be selected. if there is no data cells above or below the cell then it should not be selected. Thank you</p>
  
  <p>I found this macro to select all data cells in range, is it possible to add an IF for the "data below" into this? I tried, Im really green with VBA. Thank you.</p>
  
  <pre><code>Sub SelectNotBlackRange()
  'Update20131220
  Dim Rng As Range
  Dim WorkRng As Range
  Dim OutRng As Range
  On Error Resume Next
  xTitleId = "KutoolsforExcel"
  Set WorkRng = Application.Selection
  Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
  For Each Rng In WorkRng
      If Rng.Value &lt;&gt; "" Then
          If OutRng Is Nothing Then
              Set OutRng = Rng
          Else
              Set OutRng = Union(OutRng, Rng)
          End If
      End If
  Next
  If Not OutRng Is Nothing Then
      OutRng.Select
  End If
  End Sub
  </code></pre>