+ Reply to Thread
Results 1 to 8 of 8

Counting number of times an age appears, when calculated from DOB formula used

  1. #1
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Counting number of times an age appears, when calculated from DOB formula used

    HI Team,

    In cell A1 there is the DATE ENTERED of the record. In B1 there is a DOB, in Cell C1 is a formula to calculate the Age of that DOB person Today (this works and is therefore ever changing, which is important). This is repeated for many many rows of different people.

    Now i want to count how many 10yo people there are in the worksheet that were entered between 2 specific dates. I cant work out how to do this

    I have been able to get counting how many blue eyed people where entered between 2 certain dates using =SUMPRODUCT(--('Worksheet'!$A$1:$A$1553>=Summary!$D$6),--('Worksheet'!$A$1:$A$1553<=Summary!$D$7),--('Worksheet'!$L$1:$L$1553="Blue Eyes")), where the dates i want to look between are entered into Summary!$D$6 (start date) and Summary!$D$7 (end date).

    I think my problem is that the formula used to calculate the age stays in the background of the cell, and therefore looking for "10" doesnt work (i.e. using the same formula as above, and changing the range to look in and using "10" instead of "Blue Eyes"). Am i right?

    If so, can someone please advise how i do it. I have considered is there a way to add in another column and have the age calculating formula in there, and have the result be entered into the next cell, meaning that a value is entered rather than a formula in the background, does this work, and if so how? Or is there a better way.

    Please help!?!?

    Thank you.

    example attached.
    Attached Files Attached Files

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Counting number of times an age appears, when calculated from DOB formula used

    Your mistake is
    Please Login or Register  to view this content.
    It could be
    Please Login or Register  to view this content.
    But best way is
    Please Login or Register  to view this content.
    and there is no difference
    Please Login or Register  to view this content.
    Last edited by BMV; 06-05-2020 at 04:06 AM.

  3. #3
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Counting number of times an age appears, when calculated from DOB formula used

    Thanks for looking,

    I cant seem to get any of your options to work. At first i thought it was because my example was super simple, because when i tried your formulas on my example one, they WORKED. But when i increase the number of cells it needs to reference it breaks. Does this make sense.

    No matter what i enter from your examples i get a #value error.
    Last edited by MrMac80; 06-05-2020 at 02:07 AM.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Counting number of times an age appears, when calculated from DOB formula used

    To make your formulas draggable modify as such:
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Note that you need absolute cell addresses for $A$1:$B$6


    The data range is on separate sheets and not next to each other like in this example.
    That's why you must post truly representative example files...
    Attached Files Attached Files
    Last edited by protonLeah; 06-05-2020 at 02:04 AM.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Counting number of times an age appears, when calculated from DOB formula used

    Sorry, working with sensitive data, so didnt want to make a mistake. My example was too simple.

    I have done my best with this one, by using an old sheet, and removing all details, except the important ones. I hope this is better.
    Attached Files Attached Files

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Counting number of times an age appears, when calculated from DOB formula used

    =COUNTIFS('2020 EDT Youth Data '!$B$4:$B$999;">="&$D$6;'2020 EDT Youth Data '!$B$4:$B$999;"<="&$D$7;'2020 EDT Youth Data '!$H$4:$H$999;SUBSTITUTE(Summary!C15;"yo";""))

  7. #7
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Counting number of times an age appears, when calculated from DOB formula used

    HI BMV, that didnt work. "There's a problem with this formula" error. It highlighted "$B$4:$B$999" any ideas.

    This is what i couldnt work out. Not sure why this is not working

    EDIT: i couldnt work out why it wasnt working, then i changed the ; to , and it worked

    Thank you all
    Last edited by MrMac80; 06-07-2020 at 11:01 PM.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Counting number of times an age appears, when calculated from DOB formula used

    $H$240:$H$999, should be $H$4:$H$999

+ 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. Replies: 5
    Last Post: 06-15-2015, 02:47 PM
  2. Help with counting the number of times a certain text appears
    By buckles23 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-04-2014, 11:53 AM
  3. [SOLVED] Counting number of times unique id appears
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-26-2012, 01:06 PM
  4. Replies: 3
    Last Post: 05-14-2012, 10:22 PM
  5. Replies: 2
    Last Post: 03-14-2012, 08:12 AM
  6. Counting the number of times a month appears
    By Kololo in forum Excel General
    Replies: 3
    Last Post: 02-24-2012, 10:29 PM
  7. Counting the number of times an entry appears
    By nickifan in forum Excel General
    Replies: 2
    Last Post: 11-22-2010, 12:04 PM

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