+ Reply to Thread
Results 1 to 3 of 3

returning a value from a date range

  1. #1
    Registered User
    Join Date
    05-21-2007
    Posts
    24

    returning a value from a date range

    Hi there,

    I have a simple problem using IF statement, basically I want cell A2 to return the PRES AGE once i input a date of birth on cell A1.

    Here are the scenarios:

    1. Date of birth is before 1/07/1960, then PRES AGE is = 55
    2. Date of birth is beetween 01/07/1960 to 30/06/1961, then PRES AGE is = 56
    3. Date of birth is beetween 01/07/1961 to 30/06/1962, then PRES AGE is = 57
    4. Date of birth is beetween 01/07/1962 to 30/06/1963, then PRES AGE is = 58
    5. Date of birth is beetween 01/07/1963 to 30/06/1964, then PRES AGE is = 59
    6. Date of birth is after 30/06/1964, then PRES AGE is = 60

    Your help would really be appreciated.Thanks.- from a Newbie
    Last edited by quickbrwnfox; 02-01-2010 at 09:44 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: returning a value from a date range

    =lookup(a1,{0,"7/1/60","7/1/61","7/1/62","7/1/63","7/1/64"} + 0,{55,56,57,58,59,60})

    ... with dates changed appropriate to your regional settings.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-21-2007
    Posts
    24

    Re: returning a value from a date range

    Thanks...this solved my problem!!!

+ 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