+ Reply to Thread
Results 1 to 3 of 3

AND and OR Statements within an IF Statement.

  1. #1
    Registered User
    Join Date
    12-09-2013
    Location
    Yellowknife, NT, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    AND and OR Statements within an IF Statement.



    Good Day to All;
    I am stuck on writing a formula. I currently have a formula that works but I need to make part of it an OR statement. I have not had any luck with this.

    This is what part of my spreadsheet looks like:

    Excel Help Picture.PNG
    (I am trying to insert a .png, but I don't know if it will work.)

    And here is my formula for Rowe 5, which checks to see if the Supervisor Training has been completed and that the first four numbers in D5 is >= 2015:
    =IF(D5="?","Unknown",IF(AND(D5>=DATE(LEFT($I$2,4),4,1),ISBLANK(E5)),1,0))

    This formula works great Row 5, but a Maintainer is considered Untrained until BOTH the Summer and Winter Maintenance Training has been completed.

    So for Rows 6 and 7, in the second IF Statement I have to check that:

    The first four numbers in D6 >= 2015
    AND
    F6 is blank
    OR
    G6 is blank

    I cannot seem to get within an IF Statement, an AND Statement that combines an OR Statement.

    I am stumped.

    Any ideas?
    Last edited by krowe111; 02-14-2016 at 04:08 PM. Reason: Trying to insert a picture.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: AND and OR Statements within an IF Statement.

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    11-11-2015
    Location
    Southend
    MS-Off Ver
    2013
    Posts
    52

    Re: AND and OR Statements within an IF Statement.

    You havnt downloaded your spreadsheet
    But in general - columns are free ! use them
    If you are trying to do b1 = a massive formula on a1 then do
    b1 = or(xxx, xxx)
    C1 = or (yyy,yyy)
    D1 = and(b1,c1)

    much easier to understand and debug and you can hide cols b and c if you dont need to see them in finished reult

+ 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. combining or statements into one statement
    By elmasguapo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2015, 02:32 AM
  2. Combining two IF statements into one IF statement
    By jonvanwyk in forum Excel General
    Replies: 4
    Last Post: 03-06-2012, 12:58 PM
  3. If statement help-multiple statements
    By vargs in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-09-2010, 03:17 PM
  4. Embedding IF statements into IF statement
    By prefcomm in forum Excel General
    Replies: 4
    Last Post: 04-03-2009, 09:52 AM
  5. If Statement Logical Statements
    By klinrya in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-14-2007, 03:31 PM
  6. IF statement within if statements
    By BKM in forum Excel General
    Replies: 5
    Last Post: 11-27-2006, 10:13 AM
  7. [SOLVED] IF Statements-Can you have more than one IF statement in a cell?
    By Julie in forum Excel General
    Replies: 1
    Last Post: 05-01-2006, 02:50 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