There is a simple function that you can use to put the number of ... ten or twenty rows, you can use this formula to get your job done. Read: How to count Nonblank Cells in Excel.