Yes you can do this.Get value of lastcolumn & lastrow in to any variable eg. "f"& use it inside the range input as range1 = range("A1:A"&f)