+ Reply to Thread
Results 1 to 13 of 13

Nesting IF Formula with multiple conditions

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Nesting IF Formula with multiple conditions

    I’ve been piecing together formulas with information previously given to me on these wonderful forums, but can’t successfully get this one correct.

    I need a formula that will determine if a line is active or expired by first looking at the category and then looking at the number of days. (While still incorporating the ISBLANK section of the current formula.)

    For Example: If the category is either FWW or FWW Ext then the line will expire after 365 days. If not, then it will expire after 180 days.

    I’ve attached a sample spreadsheet.
    Book2.xlsx

    Hoping this makes sense!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,925

    Re: Nesting IF Formula with multiple conditions

    See attached. Straightforward using VLOOKUP if you rewrite the table of expiration by category below and to the right of your data.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    Thanks.

    Is it possible to create a formula that does not reference a table? I should have explained better that the table was there merely for reference in this forum. The actual spreasheet has over 1,000 lines (and growing) and multiple tabs so as much as I can contain the data I want to.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: Nesting IF Formula with multiple conditions

    does this do what you are after
    =IF(ISBLANK(A2),"",IF( AND(OR(D2="FWW", D2="FWW Ext"), B2>365),"EXPIRED",IF(B2>180,"EXPIRED","ACTIVE")))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    Yes, I think that works. Let me play around with that on different lines. Thanks!

    Quote Originally Posted by etaf View Post
    does this do what you are after
    =IF(ISBLANK(A2),"",IF( AND(OR(D2="FWW", D2="FWW Ext"), B2>365),"EXPIRED",IF(B2>180,"EXPIRED","ACTIVE")))

  6. #6
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    The formula above only works with the data remains static. If the category is changed then the status does not update even though the new data meets the criteria of the formula. The category data could change from time to time if a correction is needed.

    Book2.xlsx

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: Nesting IF Formula with multiple conditions

    sorry dont understand
    if you are changing categories, then you would need a table approach - which you can change the criteria
    otherwise if you want it fixed in the formula , then it cannot accommodate any changes to the rules

    in your example
    if the category is not "FWW", or "FWW Ext" then the test is if the age is greater than 180, which it is

  8. #8
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    Quote Originally Posted by etaf View Post
    sorry dont understand
    if you are changing categories, then you would need a table approach - which you can change the criteria
    otherwise if you want it fixed in the formula , then it cannot accommodate any changes to the rules
    Ok I guess I don't understand this approach. If the formula is set to read certain criteria then it should still work when that criteria is met. No?

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: Nesting IF Formula with multiple conditions

    Yes
    and the criteria is that

    As its NOT "FWW", or "FWW Ext"

    then the test is just is it over 180 days , which it is

    so what is your criteria , as WW can be changed to anything other than "FWW", or "FWW Ext"
    as your example in your original post
    If the category is either FWW or FWW Ext then the line will expire after 365 days. If not, then it will expire after 180 days.
    123 x 10/07/2013 238 EXPIRED a WW <----Status does not update when category is changed to a different criteria

  10. #10
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    Ok, then that is not the formula I need then because if it does not meet the FWW or FWW Ext criteria then it should be performing the calculation of 180 days. It is not doing that.

    If I enter a date that results in 181 days it should be active if it is NOT a FWW or FWW Ext. However it does not change it. THis is why I don't believe the formula is updating correctly. It's only performing the 365 day calculation regardless of the category.

    Book2.xlsx
    Last edited by coloradolime; 03-05-2014 at 02:56 PM.

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: Nesting IF Formula with multiple conditions

    Try
    =IF(ISBLANK(A2),"",IF( AND(OR(G2="FWW", G2="FWW Ext"), D2>365),"EXPIRED",IF(D2>180,"EXPIRED","ACTIVE")))

    I used D2 instead of G2 - sorry about that

  12. #12
    Registered User
    Join Date
    02-26-2014
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Nesting IF Formula with multiple conditions

    Hmm. That doesn't work either. Looks like I'm going to have to take a different approach.

  13. #13
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: Nesting IF Formula with multiple conditions

    can you give the rules again ?
    and why not working ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Nesting multiple Vlookup conditions in an If funciton
    By AMSTARR in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-02-2011, 06:45 PM
  2. Create a nesting formula w/ multiple conditions based on fields w/VLOOKUP
    By NiqueDomie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2011, 09:59 AM
  3. nesting a multiple IF formula
    By formulaHelp in forum Excel General
    Replies: 3
    Last Post: 09-23-2009, 04:34 PM
  4. Exceedeing the 7 conditions in a nesting fomula
    By Nick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2006, 01:55 PM
  5. [SOLVED] Nesting more than 7 conditions?
    By Gina in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-08-2006, 09:45 PM

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