function isEmpty(y) { for (x = 2; x <= Right; x++) { if ([x,y] != "") { return false; } } return true; } for (y = Bottom; y >= 1; y--) { if (isEmpty(y)) { DeleteRow(y); } }