+ Reply to Thread
Results 1 to 4 of 4

Thread: Possible nested IF formula...

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    2

    Possible nested IF formula...

    Ok, I'll try to be as detailed as possible.

    These are the cells and values:

    A1 - 120
    A2 - 340
    A3 - 110
    A4 - 110
    A5 - 110
    A6 - 110

    Ok I've taken cell B1 to calculate A2-A1, and then B2 to calculate A3-A2. I'll skip cell B3 because I've taken care of that formula.

    Now, here is my problem. I'm looking for a formula for my cell B4 that can say: if my A4 value is equal to A3 and A5, then display cero in this celI. If A4 is not equal to A3 or A5, then I can continue to subtract A4-A3. But if A4 is ONLY equal to A5 then subtract A1-A4

    I hope that helps.
    Last edited by yekom; 09-01-2011 at 02:00 PM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,228

    Re: Possible nested IF formula...

    So, in B4:

    =IF(AND(A4=A3,A4=A5), 0, IF(A4=A5, A1-A4, A4-A3))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Possible nested IF formula...

    @JBeaucaire

    Thanks a lot for your help, it worked perfectly! You saved my life :D

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,228

    Re: Possible nested IF formula...

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ 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