+ Reply to Thread
Results 1 to 10 of 10

Age filter problems,

  1. #1
    Registered User
    Join Date
    12-20-2014
    Location
    Amsterdam
    MS-Off Ver
    2003
    Posts
    4

    Age filter problems,

    Hi Guys, Nice to be here, I already learned a lot on this forum.

    I have a question though..

    I making an automated invoice system for my company, I want an automatic date answer and having lots of troubles doing it.

    When the date of birth is filled in, i want an automated answer in de next cell, that says, child, youth or adult. Is this possible? thanks!

    Attachment 367864
    Last edited by WouterVellekoop; 01-01-2015 at 07:18 PM.

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

    Re: Age filter problems,

    You must post an actual workbook:
    To attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-20-2014
    Location
    Amsterdam
    MS-Off Ver
    2003
    Posts
    4

    Re: Age filter problems,

    I don't understand, I'm sorry.. like this?

    Book1.xlsx

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Age filter problems,

    Try this

    =IF(ROUNDDOWN((TODAY()-A2)/365.25,0)>18,"Adult",IF(ROUNDDOWN((TODAY()-A2)/365.25,0)>13,"Youth","Child"))
    Happy with my advice? Click on the * reputation button below

  5. #5
    Registered User
    Join Date
    12-20-2014
    Location
    Amsterdam
    MS-Off Ver
    2003
    Posts
    4

    Re: Age filter problems,

    Thanks Man!

    If I paste in this code, excel gives an error, that always happens if I paste in a code from internet, it has something to do with "" vs. []?

    So I can't test this..

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Age filter problems,

    B2=DATEDIF(A2,TODAY(),"y")
    C2=IF(B2>18,"Adult",IF(B2>13,"Youth","Child"))
    both coped down

    Note that your regional settings may need you to change , to ;

    Also, please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Age filter problems,

    This, too:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Please note: I do not know if or how regional settings affect the array delimiters.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Age filter problems,

    well if you open the workbook excel will auto change it to whatever settings you are using
    click e2 have a look in the formula bar to see what changes then you'll know exactly what it should look like
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    12-20-2014
    Location
    Amsterdam
    MS-Off Ver
    2003
    Posts
    4

    Re: Age filter problems,

    Wow,

    I've got a dutch version of excel so it's totally different.

    Please Login or Register  to view this content.

    But it's working now, YES!

    Thanks Guys

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Age filter problems,

    next time you get a formula in english go here
    http://en.excel-translator.de/

    try inputting this formla
    =LOOKUP(YEAR(TODAY()-$A2)-1900,{0,"Child";12,"Youth";18,"Adult"})

    and choose dutch as your target language,choose ; as your separator
    you dont have to worry much about version of excel unless its earlier or = 2003 then choose that
    click translate
    it will show you
    =ZOEKEN(JAAR(VANDAAG()-$A2)-1900;{0;"Child";12;"Youth";18;"Adult"})

+ 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. Sorting & Filter Problems...
    By battousai9 in forum Excel General
    Replies: 2
    Last Post: 11-19-2013, 04:45 AM
  2. Filter Problems
    By Stopea in forum Excel General
    Replies: 1
    Last Post: 08-21-2012, 10:34 AM
  3. Filter Problems
    By Gorf3 in forum Excel General
    Replies: 3
    Last Post: 01-08-2008, 01:56 PM
  4. Filter problems
    By Berry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2006, 09:30 AM
  5. Auto-Filter Problems...
    By Kompressor in forum Excel General
    Replies: 2
    Last Post: 06-10-2005, 08:05 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