+ Reply to Thread
Results 1 to 3 of 3

Having trouble with if(x=y,z,a) formula

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    georga
    MS-Off Ver
    Excel 2010
    Posts
    7

    Having trouble with if(x=y,z,a) formula

    I'm not sure if I can even do this as a formula and if I would have to create a macro for this but I was hoping someone could help me figure out what the formula would be to accomplish my task. Here and overview.

    What I have is budget that I’m trying to create with accounts that will work interactively with each other.
    I’m trying to do this: Account 1: 150 Cell(A1)
    Account 2: 150 Cell(A2)
    Account 3: 200 Cell(A3)
    Excess of Acct. 3: x Cell(A4)
    if x>=0 then Account 2 = 150 If account
    If x<= 150 then Account 2 =0 and excess of that is subtracted from Account 3
    Other wise Account 2 - Excess of account 3

    Written out: If I spend more than 200 dollars from account 3 then that goes into excess of account 3 which lowers the budget of of Account 2 and account 1. So if there is no excess from account 3 then Account 2 will equal 150 dollars. If there is an excess from account 3 and it is less than 150 dollars then I want the excess to be subtracted from Account 2 in cell A2. So lets say excess is 100 then Account 2 should equal 50 dollars. If excess is great than 150 then I want Account 2 to equal zero and the excess of that subtracted from account 1 in Cell (A1). So if excess is 200 then subtract account 2 in (A2) will be zero and account 1 in cell (A1) will equal 100.


    I was trying to use the if(x=y,z,a) formula but I wasn't clever enough to get it to work... I'm sorry if I over explained it and I apprecaite any help in the matter.

    Thanks in advance,

    Moe
    Last edited by mrizvi88; 03-07-2013 at 09:07 PM. Reason: Solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Having trouble with if(x=y,z,a) formula

    Assuming:

    A5: Amount spent (you enter in this cell the amount of money you spent)

    A1: =IF($A$5>350, MAX(0, 550-$A$5), 150)
    A2: =IF($A$5>200, MAX(0, 350-$A$5), 150)
    A3: =MAX(0, 200-A5)
    _________________
    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
    03-07-2013
    Location
    georga
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Having trouble with if(x=y,z,a) formula

    Thank you! Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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