try this..... lrow = worksheet("sheet1").Cells.specialcells(xlcelltypelastcell).rowthat will give you the last row number in the worksheet