+ Reply to Thread
Results 1 to 8 of 8

Sort out age classes

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Sort out age classes

    I have a list in rows persons birth year.
    1943
    1950
    2016
    2005
    etc
    Let us say 100 persons $A$3:$A$100 in a index.

    Now..
    I want to select persons to a list that presents the number of each group
    based on PC date so I dont need to change it next year from 2017 to 2018.
    0-12
    13-18
    19-25
    26-35
    36-45
    46-55
    56-65
    65 +

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Sort out age classes

    In B3 copied down:

    =LOOKUP(YEAR(TODAY())-A3,{0,13,19,26,36,46,56,65},{"0-12","13-18","19-25","26-35","36-45","46-55","56-65","65+"})
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Sort out age classes

    Indeed works fine, thanks
    Iwould like to have the numbers of each ageclass to
    a list

    0-12 34
    13-18 49
    etc

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Sort out age classes

    This then:
    Excel 2016 (Windows) 32 bit
    A
    B
    3
    1943
    65 +
    4
    1950
    65 +
    5
    2016
    0-12
    6
    2005
    0-12
    7
    0-12
    2
    8
    13-18
    0
    9
    19-25
    0
    10
    26-35
    0
    11
    36-45
    0
    12
    46-55
    0
    13
    56-65
    0
    14
    65 +
    2
    Sheet: Sheet3

    Excel 2016 (Windows) 32 bit
    B
    3
    =LOOKUP(YEAR(TODAY())-A3,{0,13,19,26,36,46,56,65},{"0-12","13-18","19-25","26-35","36-45","46-55","56-65","65 +"})
    Sheet: Sheet3

    Excel 2016 (Windows) 32 bit
    B
    7
    =COUNTIF($B$3:$B$6,A7)
    Sheet: Sheet3

  5. #5
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Sort out age classes

    I really appreciate it
    THANKS REAL GOOD ONE

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Sort out age classes

    You're welcome!

  7. #7
    Forum Contributor
    Join Date
    11-10-2012
    Location
    Sweden, Stockholm
    MS-Off Ver
    MS Excel 365
    Posts
    175

    Re: Sort out age classes

    HI Can you help me or give me a tip how to proceed?

    SEALPINO
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Sort out age classes

    You will need to mark the thread as not solved if you are asking for more help on the same query. If this is a new query, then you should start a new thread.

+ 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. [SOLVED] VBA Classes For ADO
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-14-2015, 11:07 AM
  2. T-value for different classes
    By dr.cuco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-14-2013, 07:16 PM
  3. Replies: 5
    Last Post: 11-04-2013, 11:28 AM
  4. VB classes in VBA
    By negcx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2008, 05:28 PM
  5. Classes
    By blatham in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2008, 05:47 PM
  6. [SOLVED] Classes containing Classes
    By Adam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2006, 02:50 AM
  7. Using Classes in .xla
    By oli in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2005, 06:37 AM

Tags for this Thread

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