# Thread: Calculate % of cells that hold dates (2003)

1. ## Calculate % of cells that hold dates (2003)

Hi everyone...

Need percent of those completed (or with date) in cell A13 which must be adjusted should I add a new record (row) with the insert
or delete a record, so it cannot refer to an exact number of cells in the calculation
As you can see the percent complete is incorrect as it gives 100% when it is not.
I thought it might be because what I'm looking at is dates in column A and counta works on values or text
HELP Do I need an if statement here?
The range must be dynamic as I may insert or delete rows in the range
I am enclosing an Excel 2003 example sheet to help explain

2. ## Re: Calculate % of cells that hold dates (2003)

Your formula =COUNTA(A2:A12)/COUNTA(A2:A12) will by definition ALWAYS result in 100% (unless all cells are empty). Does this do what you want?

=COUNTA(A2:A12)/(ROW(A12)-ROW(A2)+1)

or

=COUNTA(A2:A12)/(COUNTA(A2:A12)+COUNTBLANK(A2:A12))

3. ## Re: Calculate % of cells that hold dates (2003)

PERFECT again. Thank you so much Hans. Both worked great!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•