+ Reply to Thread
Results 1 to 4 of 4

how to write a nested if formula with special conditions

  1. #1
    Forum Contributor
    Join Date
    06-24-2008
    MS-Off Ver
    2007
    Posts
    139

    how to write a nested if formula with special conditions

    I thought that a nested if is what I needed, but now I don't know what I need I have explained in greater detail within my sample that's attached.

    I don't know how to write a function for what I need.
    Right now I have a function that says '= if $b7=0,0,if($d7>$d5,-1,1)), but I've found a problem.
    If there's more than one zero it throws off what I'm doing.
    I need a function that will ignore any zeros within column D and use the second to last number.

    For example:

    The formula in E12 should read '=if($B12=0,0,if($D12>$D8,-1,1))
    The formula in E13 should read '=if($b13=0,0,if($D13>$D9,-1,1))
    The formula in E20 should read '=if($b20=0,0 ,if($d20>$d12,-1,1))

    I just don't know how to write this so that it will go back to the second to last number other than zero.
    Attached Files Attached Files
    Last edited by novice2430; 08-19-2009 at 08:53 PM. Reason: Added notes from spreadsheet to post so people can see and search on the information. Please do this in the future.

  2. #2
    Forum Contributor
    Join Date
    06-24-2008
    MS-Off Ver
    2007
    Posts
    139

    Re: how to write a nested if formula with special conditions

    Can anyone help out?

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: how to write a nested if formula with special conditions

    what do you mean the second to last number? what result should be in column e
    edit oh i see hmmmm
    ok perhaps like this with a helper column and new formulas where indicated
    Attached Files Attached Files
    Last edited by martindwilson; 08-19-2009 at 07:05 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    06-24-2008
    MS-Off Ver
    2007
    Posts
    139

    Re: how to write a nested if formula with special conditions

    Thank you for your help that worked great!

+ 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.6.0 RC 1