Thanks for the code Dave but I need to do this in a worksheet function rather than with code. Any suggestions?

Thanks for the suggestion Steve. However I need the function to work on the entire column and therefore do not know the range.
If I use
=COUNTBLANK(A:A)+COUNTA(A:A)
then it simply returns the count of the entire row.

Does anyone know a way to count the cells including blank cells with a worksheet function?

i.e.
Col A could contian numbers and text and blank spaces <blank>
Heading 1
Heading 2
<blank>
test 1
<blank>
result
3
4
5
<blank>
test 2
<blank>
result
6
7
8

=COUNTA(A:A)
returns 12 in either Excel 2000 or Excel 2007

=COUNTIF(A:A,"")
returns 4 in Excel 2000 but returns 65524 in Excel 2007 (in compatability mode)

I need a function that will return 16 for the example column A shown in both Excel 2000 and Excel 2007

In Excel 2000 I can use

=COUNTA(A:A)+COUNTIF(A:A,"")
But in Excel 2007 this same function gives 65536 (in compatability mode).