+ Reply to Thread
Results 1 to 5 of 5

Help with sum of a variable range

  1. #1
    Registered User
    Join Date
    06-18-2009
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help with sum of a variable range

    I'm trying to build a simple checkbook program for a friend. I've figured out most of what I want it to do and have been able to program in everything I want except for basically one item. One of the features is a monthly calculator of types. I want it to have inputs for a begin date and end date and then output the beginning balance of that date, the total deposits, the total withdrawals, and the concluding balance. I've already got the beginning/concluding balances, but can't figure out how to do the deposits/withdrawals. I've tried using =sum((lookup([date], [deposits])):(lookup([2nd date], [deposits])) and that obviously didn't work. Any ideas? I've attached the program with some sample data in it so you can better understand what I'm trying to do. Thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Help with sum of a variable range

    The formula you want is :-

    =SUMIFS($F$5:$F$305,$C$5:$C$305,">="&$L$8,$C$5:$C$305,"<="&$L$9)

    =SUMIFS($E$5:$E$305,$C$5:$C$305,">="&$L$8,$C$5:$C$305,"<="&$L$9)
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  3. #3
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: Help with sum of a variable range

    Write below formula in Cell L12

    L12=SUMPRODUCT((C6:C17>=L8)*(C6:C17<=L9)*E6:E17)
    Last edited by mubashir aziz; 06-18-2009 at 03:42 AM.
    If this post helps, Please don't 4get to click the star icon located at the bottom left of my Post.

  4. #4
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Help with sum of a variable range

    SUMIFS is more robust and quicker since the OP is using Excel 2007

  5. #5
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Help with sum of a variable range

    I offered an alternate on your sheet using excel tables, this has the advantage that you can add as many transactions as you want and the formulas will still work, while only searching the minimum number of cells to generate your totals

    It also avoids the references to full columns (A:A) as the ranges will expand dynamically!

    You can also sort on date, or filter on date ranges, transaction types etc!

    To add a transaction, just start typing on the next line, the balance formula will autofill for you!
    Attached Files Attached Files

+ 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