+ Reply to Thread
Results 1 to 2 of 2

Multiple If Statements Working, with Errors

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel for Mac 2011
    Posts
    1

    Multiple If Statements Working, with Errors

    There are three if statements I'd like to combine to automate the following actions.

    If the column labeled "Package" is one of three values, it needs to add a different amount of days to the "JIRA Creation Date":
    - If "Package" is "Standard" it needs to add 21 days
    - If "Package" is "Advanced" it needs to add 28 days
    - If "Package" is "Enterprise" it needs to add 42 days

    If "Package" is none of these values, the cell that the value is being calculated into can remain blank.

    "Package" is formatted as general, "JIRA Creation Date" as a date, and the column the formula is in is a date

    The following statement works, calculating the correct value, but has an error "This cell is inconsistent with the column formula"
    =IF([@Package]="Standard", [@[JIRA Creation Date]]+21, IF([@Package]="Advanced", [@[JIRA Creation Date]]+28, IF([@Package]="Enterprise", [@[JIRA Creation Date]]+42, "")))

    Why is it doing this?

    Screen Shot 2013-01-21 at 2.50.26 PM.png

  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,086

    Re: Multiple If Statements Working, with Errors

    One way:

    =$H2+IFERROR(CHOOSE(MATCH($E2, {"advanced","enterprise","standard"},0),21,42,28),0)


    regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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