+ Reply to Thread
Results 1 to 7 of 7

Age range formula counting blank cells

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Age range formula counting blank cells

    Hey,

    I have a list of Date of Births, and another table that categorises the DOBs into age ranges. I'm using the formula e.g. =SUMPRODUCT(--(DATEDIF(B3:B16,TODAY(),"Y")<18)) for age ranges below 18.

    But for 65 years and over, the formula =SUMPRODUCT(--(DATEDIF(B3:B16,TODAY(),"Y")>64)), seems to also count blank cells. Is there a way to stop it from counting blank cells? I've attached the spreadsheet for reference.

    Thanks!

    T
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Age range formula counting blank cells

    Have you tried frequency function? And it doesn't take blank into consideration when you do the counting

    http://support.microsoft.com/kb/100122
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Age range formula counting blank cells

    Jie,

    Thanks for the tip. But how would you embed the SUMPRODUCT into the FREQUENCY function?

  4. #4
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Age range formula counting blank cells

    Oh never mind, I missed the attachment

  5. #5
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Age range formula counting blank cells

    Is there a way of doing this without putting a new column in for Age? I'm working with a spreadsheet that I can't put new columns in for.

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Age range formula counting blank cells

    Change your formula to

    =FREQUENCY(DATEDIF($B$3:$B$15,TODAY(),"y"),{17,24,19,34,39,44,49,59,64})
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Age range formula counting blank cells

    Great- thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Counting Blank cells in a range
    By Jackie11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 10:42 PM
  2. [SOLVED] counting blank cells in a range
    By dcoates in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-16-2013, 08:45 AM
  3. Counting of Specific range of BLANK cells
    By ray963 in forum Excel General
    Replies: 6
    Last Post: 05-22-2011, 09:57 AM
  4. Excel 2007 : Counting a Date Range + blank cells
    By Rino468 in forum Excel General
    Replies: 3
    Last Post: 11-01-2010, 02:40 PM
  5. Replies: 0
    Last Post: 08-23-2005, 03:43 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1