+ Reply to Thread
Results 1 to 4 of 4

Looking up data in a database

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    1

    Looking up data in a database

    I have a database in excel and then a vlookup formula in another page looking up all a members details.
    So I have year joined and date of birth
    So I need a formula that members that have been with us for 25 years should say honorary
    members who are under 18 years of age should say junior.
    Members who are dont fit into any of these should say full
    Last edited by JBeaucaire; 12-06-2012 at 04:49 PM. Reason: Corrected thread title to topic only, as per forum rules

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Looking up data in a database

    You get better help, if you post an excel file, without confidentional information.

    Please also add, the desired result.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Looking up data in a database

    A1: Year Joined
    B1: DOB

    C1: =IF(DATEDIF(A1, TODAY(), "y")>=25, "honorary", IF(DATEDIF(B1, TODAY(), "y")<18, "junior", "full"))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Looking up data in a database

    Two things:

    - Read the forum rules regarding Topic Titles. Your title needs to be more descriptive
    - You most likely need to include sample data to get better help

    As far a general ideas toward a solution:
    - Assuming you have three fields in columns (Name, Date_Joined and Date of Birth(DOB))
    - Case 1: Junior Member =(TODAY()-DOB)/365 = Age in years. If Age <18 = Junior Member
    - Case 2: Honorary =(TODAY()-Date_Joined)/365 = Year Joined. If Years_Joined >25 = Honorary
    - Case 3: If not Case 1 or Case 2 = Full
    Last edited by K m; 12-06-2012 at 04:58 PM.
    Click on star (*) below if this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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