Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    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. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    PERFECT again. Thank you so much Hans. Both worked great!
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Posting Permissions

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