Posted By

ducalpha on 08/06/13


Tagged

excel vba


Versions (?)

Select discrete cells


 / Published in: VB.NET
 

Select discrete cells in a sheet

  1. Sub SelectDiscreteCells()
  2. '
  3. ' Select discrete cells
  4. '
  5.  
  6. Dim range
  7. Set range = Selection
  8. Dim i As Long
  9. For i = 1 To 9
  10. ActiveCell.Offset(10, 0).Select
  11. Set range = Union(range, Selection)
  12. Next i
  13. range.Select
  14. End Sub

Report this snippet  

You need to login to post a comment.