+ Reply to Thread
Results 1 to 4 of 4

need an IF statement

  1. #1
    Registered User
    Join Date
    12-03-2015
    Location
    New York, NY
    MS-Off Ver
    Home & Business 2013
    Posts
    20

    need an IF statement

    Is it possible to combine the following formulas into one cell?

    =IF(AND(F2="", K2=1),"3/15/2016","9/15/2016")
    =IF(AND(F2="", K2=2),"4/18/2016","9/15/2016")
    =IF(AND(F2="", K2=3),"11/15/2016","5/15/2017")

  2. #2
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: need an IF statement

    Hi abelle82,

    Below is the closest I believe you can get. Now someone much better than me may be able to correct me if I am wrong however I do not believe you can have multiple "value if false" results. When you use if and, the formula takes the first set of instructions and if it is true it will return the "if true" value. However if it is not true it will move on to the "if false" value and uses whatever you have listed as the answer. The reason you can have a bunch of nested IF/AND statements is because you are telling the formula to move on to the next IF/AND statement if your original rule is false. The second you give a distinct value for the "if false" value the formula would end. I hope my explanation makes sense.

    Please Login or Register  to view this content.
    Last edited by Teblol; 01-20-2016 at 05:18 PM.

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: need an IF statement

    No. If the AND condition is not met is different in the last one. How to know which one to use?
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: need an IF statement

    I think the problem you have is that with your first two conditions F2="" and K2=1 or 2, if it doesn't meet those conditions you've given it an alternative answer of 9/15/2016 so for your next set of conditions don't matter (F2="",K2=3).
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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: 07-09-2015, 04:25 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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