+ Reply to Thread
Results 1 to 6 of 6

Addition and subtraction from cell

  1. #1
    Registered User
    Join Date
    12-08-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Addition and subtraction from cell

    I am trying to set up a banking ledger and I need some help

    In column C, I have all deductions.
    In column D, I have all deposits
    In a cell in columns H, I want the balance of all transactions. So I put the starting balance in H1 and figured that I could subtract all entries from that balance from column C and add to the balance all entries from column D. So the balance in column H would go up or down depending on what column I put the number in. I am not sure how to do that formula. I got the subtraction going by doing this

    =h2-sum(C2:C5000)

    H2 is the starting balance of my account. C2 through C5000 would be the subtraction column where D2 through D5000 would be the addition column. How do I change the formula to add and subtract?
    Last edited by cybershot; 01-01-2016 at 06:52 PM. Reason: Title fix

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Help with formula

    Hello,

    You don't need to do a sum of the whole range in every row. In fact, that is a very inefficient way and will slow the workbook down.

    If you have labels in row 1, enter the starting balance into cell H2. Then you can use this formula in cell H3 and copy down:

    =H2-C3+D3

    which is balance from above minus deductions plus deposits from the current row.

    cheers, teylyn

  3. #3
    Registered User
    Join Date
    12-08-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Help with formula

    I tried that and it didn't work. I have attached a test sheet to this thread for you to see.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with formula

    Unfortunately your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,419

    Re: Addition and subtraction from cell

    I will agree with teylyn, that his approach would be the most efficient. "I tried that and it didn't work" is often not a very helpful description of what went wrong. It seems to me that it should have worked. What exactly did you try, and exactly what happened that it "didn't work"?

    Working in the same vein as your original formula, It seems like it should be as simple as H2-sum(C2:C5000)+sum(D2:D5000).

    In your sample file, you tried H2-C2:C5+D2:D5. Since this don't really work as a "normal" Excel function, I'm wondering what you were trying to do with this function.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    12-08-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Addition and subtraction from cell

    @MrShorty
    I tried your formula which is different than from what teylyn posted. Yours seems to be working.

    Thank you

+ 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. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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