PDA

View Full Version : Why won't this work?



Djblois
04-24-2007, 01:59 PM
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
finalSortRow = FinalRow.Offset(-1, 0).Row

xld
04-24-2007, 02:00 PM
Because FinalRow is a number, not a range, so you cannot use Offset on it, as this is a range property.

Djblois
04-24-2007, 02:05 PM
so I should subtract from it then?

vonpookie
04-24-2007, 02:10 PM
Yes.


FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
finalSortRow = FinalRow - 1

xld
04-24-2007, 02:41 PM
Depends whether you want a row number or a range object.