+ Reply to Thread
Results 1 to 5 of 5

if and ands

Hybrid View

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    38

    if and ands

    Hi

    I just cant get my head around this - some of the cells only require if statements whereas some require if(and statements - what am I doing wrong here?

    =if(A2=B2,"No Change",(if(A2>B2,"Value Decrease", if(A2<B2,"Value Increase", if(and(A2=0, B2>0.01,"New", if(and(A2>0.01,B2<0,"No Longer Applicable")))))

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: if and ands

    You have no outcome, regardless on the last and as is, you need to close the brackets after B2<0 and B2>0.01

    something like

    =IF(A2=B2,"No Change",(IF(A2>B2,"Value Decrease",IF(A2<B2,"Value Increase",IF(AND(A2=0,B2>0.01),"New",IF(AND(A2>0.01,B2<0),"No Longer Applicable"))))))
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    04-08-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: if and ands

    Thanks! But the if statements are taking precedence over the If (and statments even though the criteria are different
    Last edited by sophia_1234; 07-09-2014 at 06:28 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: if and ands

    Can you send me the data and some examples of what should be there.

  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
    53,048

    Re: if and ands

    Your request is conflicting.

    1 rule is...
    If(A2>B2,"Value Decrease",
    another rule is
    IF(A2<B2,"Value Increase",
    Yet you also want...
    IF(AND(A2=0,B2>0.01),"New",...which would then invoke the IF(A2<B2,"Value Increase", rule
    and
    IF(AND(A2>0.01,B2<0),"No Longer Applicable" which would trigger the If(A2>B2,"Value Decrease", rule.

    I think you need to take another look at what you are trying to do here
    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

+ 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] multiple if(ands 's
    By fansoffloyd in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-30-2012, 03:51 PM
  2. multiple if(ands 's
    By fansoffloyd in forum Excel General
    Replies: 1
    Last Post: 05-29-2012, 02:54 AM
  3. IF with two ANDs and 3 answers
    By jomili in forum Excel General
    Replies: 6
    Last Post: 10-26-2010, 01:12 PM
  4. Multiple If ANDs and even ORs
    By gtbear in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-29-2009, 12:55 PM
  5. Nesting ,Ands
    By teresa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2005, 11:06 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