+ Reply to Thread
Results 1 to 9 of 9

If formula with multiple outcomes

  1. #1
    Registered User
    Join Date
    01-09-2020
    Location
    Huddersfield, UK
    MS-Off Ver
    2019
    Posts
    5

    If formula with multiple outcomes

    Hi All

    Apologies for this, but I don't seem the be able to find the answer but feel that it should be fairly obvious.

    I need a formula that will calculate an If function but look at 2 different cells and subtract the amount in the cell that has a value (worksheet attached), either of the yellow boxes may have data in but could also be blank - I have managed to get it to work with one cell but not both with - =IF(ISBLANK(C2),A2,A2-C2). I essentially need the formula to subtract the amount that is in the yellow boxes.

    Advise on if this is possible would be much appreciated

    Thanks
    Attached Files Attached Files
    Last edited by Ambry1975; 09-09-2021 at 05:05 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: If formula with multiple outcomes

    Not sure why you need to test C2, or D2, for blank. Try just:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,751

    Re: If formula with multiple outcomes

    There are several combinations of blank/not blank that could happen here and it's not clear what you want in each case. Can both yellow cells have values? I took at stab at it:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    • If C2 is not blank the result will be A2-C2. (D2 will be ignored, doesn't matter if it's blank or not)
    • If C2 is blank, and D2 is not blank, the result will be A2-D2
    • If both C2 and D2 are blank, the result will be A2
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,751

    Re: If formula with multiple outcomes

    Quote Originally Posted by TMS View Post
    Not sure why you need to test C2, or D2, for blank.
    I was overthinking this, good answer.

  5. #5
    Registered User
    Join Date
    01-09-2020
    Location
    Huddersfield, UK
    MS-Off Ver
    2019
    Posts
    5

    Re: If formula with multiple outcomes

    Thanks both, yes I think that I was over thinking it as well - just couldn't see what I needed to do

    Both worked and I can use both for other projects too

    Much appreciated

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: If formula with multiple outcomes

    You're welcome. Thanks for the rep.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: If formula with multiple outcomes

    Here's a catch all that should cope with pretty much anything:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Put whatever rubbish you like into that and see what happens

  8. #8
    Registered User
    Join Date
    01-09-2020
    Location
    Huddersfield, UK
    MS-Off Ver
    2019
    Posts
    5

    Re: If formula with multiple outcomes

    This is great

    Thanks for the update

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: If formula with multiple outcomes

    Again, you're welcome.

+ 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. Formula to sum numbers with multiple outcomes
    By jminty95 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-24-2018, 06:32 PM
  2. [SOLVED] Formula for multiple outcomes
    By MTC2016 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-07-2017, 01:52 PM
  3. [SOLVED] IF AND Formula multiple outcomes
    By McCaughley7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-03-2016, 09:14 AM
  4. [SOLVED] Formula for multiple numeric outcomes ?
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-14-2014, 07:45 PM
  5. IF formula with multiple outcomes
    By warrenr6 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2012, 01:30 PM
  6. Multiple outcomes from a logical formula
    By JoeHan in forum Excel General
    Replies: 6
    Last Post: 05-24-2012, 05:54 PM
  7. If formula used for multiple outcomes
    By Scottiexcel in forum Excel General
    Replies: 1
    Last Post: 07-14-2009, 10:58 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