My vba looks something like this:
Range("A11").Select
Range(Selection, Selection.End(xlDown)).Select
This works great as long as there are 2 or more rows; however, sometimes there is only 1 row. When this happens, the range extends to the bottom of the spreadsheet.
How do I make the vba say:
If row 11 is the only row (after row 10) that is populated, only select A11, otherwise
Range("A11").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A11").Select
Range(Selection, Selection.End(xlDown)).Select
This works great as long as there are 2 or more rows; however, sometimes there is only 1 row. When this happens, the range extends to the bottom of the spreadsheet.
How do I make the vba say:
If row 11 is the only row (after row 10) that is populated, only select A11, otherwise
Range("A11").Select
Range(Selection, Selection.End(xlDown)).Select