+ Reply to Thread
Results 1 to 6 of 6

Multiple if (or and or or)

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    Reading, England
    MS-Off Ver
    Excel 365
    Posts
    69

    Multiple if (or and or or)

    Trying to write a formula in cell J9 that gives the answer "no" if all conditions in cells g9 and i9 are met or answers "yes" if any are not met. The formula I've written is: =IF(I9="","YES",IF(TODAY()>I9+1825,"YES",IF(TODAY()<I9+1825,"NO",IF(G9="","yes")))) G9 and I9 contain dates or can be blank. It seems that this only works if the condition in I9 is met. What am I doing wrong?

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Multiple if (or and or or)

    IF statements work linearly, so as soon as Excel finds one that works, it will put in your 'value if true' answer. So with your formula, if I9 is blank, it will return 'Yes' regardless of the status of G9.
    It's not clear from your formula exactly when you want 'Yes' - do you want it only if G9 and I9 are blank? Is there a Today() check for G9 too?

    Try using some AND statements and/or OR statements in your formula. Something like this (just an example - though you might be able to work out your answer from it):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope that helps - please ask if it's not clear.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Multiple if (or and or or)

    I'm not entirely sure that I follow you, but...

    =IF((AND(ISNUMBER(G9),TODAY()<I9+1825)),"No","Yes")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Multiple if (or and or or)

    Please Login or Register  to view this content.
    If someone has helped you then please add to their Reputation

  5. #5
    Registered User
    Join Date
    11-16-2011
    Location
    Reading, England
    MS-Off Ver
    Excel 365
    Posts
    69

    Re: Multiple if (or and or or)

    Sorry for confusing everybody, perhaps it would be easier if I just explained what I'm trying to do and see if somebody can come up with a formula that will do it.
    In the column marked "Assessed" there will be a date. In the column marked "used" there will be a date. I want a formula to be placed in the third colum marked "can continue" to work out whether dates written in the first two columns are within a certain time period, say 5 years, from todays date. If both are then the formula returns the statement "Yes" if either or both are not then the formula returns the statement "No". The time period difference could be different for the first column to todays date (say 5 years) than the second column to todays date (say 3 years). It is also possible that one or both of the columns will be blank in which case I also need the statement "No" to be returned in the third column. Example spreadsheet attached. Hope somebody out there can understand me!
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Multiple if (or and or or)

    OK. So, is this it then: (both dates must be present and < 5 years from today for YES, otherwise NO):

    =IF(AND(A2>EDATE(TODAY(),-60),B2>EDATE(TODAY(),-60)),"Yes","No")
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 05-26-2015, 07:29 PM
  2. Multiple cells, multiple sheets, multiple criteria matching
    By Drudnits1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 12:12 PM
  3. [SOLVED] Counting multiple items with multiple criteria from multiple sheets?
    By essee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-23-2013, 01:56 AM
  4. Replies: 20
    Last Post: 03-13-2013, 04:15 PM
  5. [SOLVED] Multiple issues - Multiple IF staements with multiple answers, or other coding.
    By inzanesrt4 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2013, 08:53 PM
  6. [SOLVED] Large spreadsheet; multiple scores on multiple dates for multiple students
    By MelindaCapri in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-16-2012, 06:03 PM
  7. Replies: 5
    Last Post: 11-04-2010, 06:02 AM

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