+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Age IF Statement

  1. #1
    Registered User
    Join Date
    04-26-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2010 (Beta)
    Posts
    14

    Age IF Statement

    I'm trying to determine pricing based on age...An example for one that I have is

    If the person is under 18, display $10...If older, display blank
    =IF(I2<18, "$10", "")

    I'm trying to figure out a range though...It needs to be "If the person is over is or is older than 18, but 64 or younger, display $15"

    Any help is appreciated!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,622

    Re: Age IF Statement

    =if(and(i2>=18, i2<=64), "$15", "")

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Age IF Statement

    The first IF will capture all ages < 18 so you can just test for < 65, i.e.

    =IF(I2<18,10,IF(I2<65,15,""))

    Note that it's generally better to have the formula return just a number, you can format the cell to display that as currency
    Audere est facere

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,622

    Re: Age IF Statement

    If you want to do arithmetic with the value, you'd be better formatting the cell as dollars and using:

    Please Login or Register  to view this content.

    Regards

+ 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