+ Reply to Thread
Results 1 to 7 of 7

Thread: Nested If statement

  1. #1
    Registered User
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Nested If statement

    Within a nested IF function can I incorporate a basic sum ? The formula I'm using is -

    =IF(C6>B6,"increase",(IF(C6<B6,"decrease",IF(C6=B6,"no change",""))))

    Where the statement is either increase, decrease I want to inoput the actual change i.e the diference between c6 and b6 for example.

    Any help would be greatly appreciated, and if this has been answered anywhere else I apolgise for re posting

    Thanks again

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Nested If statement

    maybe =IF(C6=B6,"no change",C6-B6)
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Nested If statement

    Quote Originally Posted by zbor View Post
    maybe =IF(C6=B6,"no change",C6-B6)
    Whilst this gives me the "Change" in value I need to say whether this is an increase or decrease.

    eg.

    0.50% Increase

    Thanks

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Nested If statement

    How about this:

    =IF(C6>B6,TEXT(C6/D6-1, "0,00%")&" increase",IF(C6<B6,TEXT(C6/D6,"0,00%")&" decrease","no change"))
    "Relax. What is mind? No matter. What is matter? Never mind!"

  5. #5
    Registered User
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Nested If statement

    Quote Originally Posted by zbor View Post
    How about this:

    =IF(C6>B6,TEXT(C6/D6-1, "0,00%")&" increase",IF(C6<B6,TEXT(C6/D6,"0,00%")&" decrease","no change"))
    A bit confused now as I am now getting #DIV/0, and I was not looking at anything in column D.

    Sorry, if I am being stupid as part of jmy worksheet I have 2 columns "B" containing last months data and "C" containing this months data, I have an IF function that illustrates using an arrow either up down or sidewards what this months change is. However I need to replace this with a basic statement ie. 0.5% increase, 2.25% decrease, or no change. I'm not sure whether your last reply would solve this or not ?

    Thanks again for you help

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Nested If statement

    Yes, sorry, mystyped...

    =IF(C6>B6,TEXT(C6/B6-1, "0,00%")&" increase",IF(C6<B6,TEXT(C6/B6,"0,00%")&" decrease","no change"))

    Of course you get DIV/0 since D6 was 0.
    "Relax. What is mind? No matter. What is matter? Never mind!"

  7. #7
    Registered User
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Nested If statement

    Quote Originally Posted by zbor View Post
    Yes, sorry, mystyped...

    =IF(C6>B6,TEXT(C6/B6-1, "0,00%")&" increase",IF(C6<B6,TEXT(C6/B6,"0,00%")&" decrease","no change"))

    Of course you get DIV/0 since D6 was 0.
    Thanks, this looks like it should work, I need to look again at work tomorrow however I just tested it and it seems fine.

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0