+ Reply to Thread
Results 1 to 7 of 7

IF Statement with 2 criteria

  1. #1
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    103

    Question IF Statement with 2 criteria

    Hi Guys,

    I am trying to add an extra IF statement, so probably need a nested IF? I have done the first part (please see attached) but need to know how to add an extra element.

    Breakdown

    I have a Total cell (D6) that calculates 2 cells (B1 & B2) but only A1 = "ON". If A1 is not "ON" then "not applicable" is shown.

    I now need the total (D6) to also show "not applicable" if B1&B2 bring back a value equal to or lower than 4 (A1 must also be "ON")

    confusing, but I hope I explained it...please see attachment.
    Thanks!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: IF Statement with 2 criteria

    Try this...
    =IF(AND(ROUNDUP((B1-B2)/365,0)>=4,A1="ON"),ROUNDUP((B1-B2)/365,0),"Not Applicable")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF Statement with 2 criteria

    Try

    =IF(AND((B1-B2)/365>4,A1="ON"),ROUNDUP((B1-B2)/365,0),"Not Applicable")
    Last edited by Jonmo1; 06-24-2015 at 10:46 AM.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: IF Statement with 2 criteria

    See the green cell in the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: IF Statement with 2 criteria

    Quote Originally Posted by Jonmo1 View Post
    Try

    =IF(AND((B1-B2)/365>4,A1="ON"),ROUNDUP((B1-B2)/365,0),"Not Applicable")
    good thinking, they dont need the roundup part in the test

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF Statement with 2 criteria

    I'm not quite sure this satisfies the criteria though, the description was a bit confusing.

    Can you answer the below 4 scenarios.

    A1=ON AND (B1&B2 calc) > 4 : I want ??
    A1=ON AND (B1&B2 calc) <=4 : I want ??
    A1<>ON AND (B1&B2 calc) > 4 : I want ??
    A1<>ON AND (B1&B2 calc) <=4 : I want ??

  7. #7
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: IF Statement with 2 criteria

    Awesome as always! -solved!

+ 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] countifs statement with multiple criteria for multiple criteria ranges
    By mcdermott2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2015, 11:48 AM
  2. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  3. [SOLVED] If statement that will look among multiple criteria and generate a statement
    By liz5818 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2013, 04:12 PM
  4. IF statement with criteria
    By rwiper11 in forum Excel General
    Replies: 1
    Last Post: 01-23-2012, 08:20 PM
  5. Replies: 0
    Last Post: 03-16-2011, 01:25 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