+ Reply to Thread
Results 1 to 11 of 11

Nested if function with multiple conditions

  1. #1
    Registered User
    Join Date
    11-21-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    17

    Nested if function with multiple conditions

    Hello
    I have a date that is calculated based on several varying conditions. I have started to build a nested function using if/and/or but could not get the result I needed. (Problem in Chair Not in Computer )

    I have attached a sample sheet with the conditions I need to incorporate to calculate the Date for Date b

    Thanks again for your assistance
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,850

    Re: Nested if function with multiple conditions

    If date A has data and Date 1 is empty then date b should be Date 1+90
    How would this work? There is no date in Date1, so what are you expecting the result to be???

    Please double check ALL your requirements to make sure that they are actually possible before anyone works on this for you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: Nested if function with multiple conditions

    If date A has data and Date 1 is empty then date b should be Date 1+90
    Not logical
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Nested if function with multiple conditions

    imo, the formula might be
    check condition of END result firs, then seperate each condition
    and + them together like....

    =IF( AND(B2 > 0, C2 > 0, D2 > 0 ) , "END" ,
    IF( AND( A2 > 0, B2 > 0, C2 > 0, D2 > 0) , Today() , 0 ) +
    IF( A2 - 90 < B2 , B2 + 21 , 0 ) + .... )

    may can avoid nested if.

    Regards.

  5. #5
    Registered User
    Join Date
    11-21-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Nested if function with multiple conditions

    My apologies, that should read;

    If Date a has data and Date 1 is empty then Date b should be Date a+90

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,850

    Re: Nested if function with multiple conditions

    Can date 2 or date 3 actually contain data if date 1 is empty? I cannot help thinking that several of these rules are surplus to requirements. I'd assume that dates 1 to 3 wuld be filled in sequesntially.

  7. #7
    Registered User
    Join Date
    11-21-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Nested if function with multiple conditions

    Hi

    Date 2 and Date 3 can contain data if date 1 is empty. Normally the dates are sequential but every now and again any one of Date 1, 2 or 3 might be missing.

    Cheers

  8. #8
    Registered User
    Join Date
    11-21-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Nested if function with multiple conditions

    Hello,
    I have modified my sample to remove Date A, as it introduced too many variables. I have updated the sheet with a visual check that I have included a formula for each potential scenario. (see revised attachment)
    Am I looking at this the wrong way and is there other functions that will give the result I'm looking for?

    Thanks
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Nested if function with multiple conditions

    Cell E7 reads: IF Date 1 and 3 have data and Date 2 is empty, then Date B should return "END"
    The part of the formula that seems to correspond to E7 is: +IF(AND(a2>0,c2>0,ISBLANK(b2),(B2+90)
    It seems that should read: +IF(AND(a2>0,c2>0,ISBLANK(b2),"END"
    If that is the case then it seems that all instances in which cell C2>0 will yield "END" in cell D2
    After that if only A2>0 then D2 should yield A2+90 and both other possibilities result in B2+90.
    Therefore try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Registered User
    Join Date
    11-21-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Nested if function with multiple conditions

    Hi JeteMC
    Thankyou for your reply, much neater than what I was trying to do!

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Nested if function with multiple conditions

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. [SOLVED] Nested IF Function with 4 Conditions & multiple Criteria
    By mmfardous in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-01-2021, 06:02 AM
  2. [SOLVED] NESTED IF FUNCTION-change order id based on 3 conditions
    By StaceyFCreative in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-24-2019, 04:39 AM
  3. [SOLVED] Nested If/And function based on multiple range conditions FAILING
    By formulacurious in forum Excel General
    Replies: 4
    Last Post: 02-20-2019, 01:36 PM
  4. [SOLVED] Nested IF/AND functions... Multiple Conditions
    By jnswbc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2016, 01:13 PM
  5. Replies: 8
    Last Post: 11-11-2014, 10:30 PM
  6. Replies: 5
    Last Post: 03-15-2014, 11:07 PM
  7. [SOLVED] Nested if/or function with three conditions
    By old_army90 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-14-2012, 02:41 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