U may write a macro for this:
Enter the following data into cells D1 to D4: 11, twelve…. just for an example :
Enter the following data into cell D6: 16.
Note that we have intentionally left cell D5 blank.
Click on cell E1 – the location where the results will be displayed.
Click on the Formulas tab.
Choose More Functions > Statistical from the ribbon to open the function drop down list.
Click on COUNT in the list to bring up that function’s dialog box.
Drag select cells D1 to D6 on the spreadsheet to enter the range into the dialog box.
The answer 4 should appear in cell E1 since only four of the six cells in the range contain numbers.
Cell D2, which contains text, and cell D5, which is blank, are ignored by the COUNT function.
When you click on cell E1 the complete function =COUNT( D1 : D6 ) appears in the formula bar above the worksheet.