If SRange is a positive number then you could use
However, how do you want to handle these situations.![]()
With Range("A:A") Set r = Range(.Cells(sRange, 1), .Cells(Rows.Count, 1).End(xlup)) End With
1) B1 contains a string or a bad number (e.g. -12) or an error value (e.g. #DIV/0)
2) sRange is larger than Cells(Rows.Count,1).End(xlup).Row
Bookmarks