+ Reply to Thread
Results 1 to 3 of 3

Excel 2003 calculating with years

  1. #1
    Registered User
    Join Date
    05-03-2008
    Posts
    3

    Excel 2003 calculating with years

    Hi!

    I am trying to combine numbers into different "age" groups. For example groups inside 3 years.
    The formula would be:
    =IF(AND(A1<2009;A1>2005);1;IF(AND(A1<2006;A1>2002);2;IF(AND(A1<2003;A1>1999);3;"")))
    Is there a way to calculate with the current system year without macros?
    Something like this:
    =IF(AND(A1<current year +1;A1>current year -3);1;IF(AND(A1<curent year -2;A1>current year -6);2;IF(AND(A1<current year -5;A1>current year -9);3;"")))
    ???

    The point is that i would automate the sheet for the next years!
    I am trying to avoid changing formulas for each year.
    That's why I am trying to include the current year (PC system time) in to calculations!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You can get the current year with YEAR(NOW()) or YEAR(TODAY()), although you could probably shorten that formula by using a LOOKUP, i.e.

    =LOOKUP(A1;YEAR(NOW())-{3000;8;5;2;-1};{"";3;2;1;""})

    Assuming A1 contains a year (not a date)

  3. #3
    Registered User
    Join Date
    05-03-2008
    Posts
    3
    Thanx a lot!

    It work!

+ 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