+ Reply to Thread
Results 1 to 3 of 3

Using a variable date to stop Summing when that date is reached

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    Using a variable date to stop Summing when that date is reached

    Hi

    I have a spreadsheet that has a column with Months and a second column with numbers. I want to get the sum of the numbers but only up to the month that I specify in a different cell. It would be somewhat of a running total, but I want it to stop at the month I specify.

    For example, I have Jan-11, Feb-11, Mar-11....Dec-11 in one column and each corresponds to a number in a second column. If I enter Jun-11 in an input cell, I want Excel to sum all the numbers but stopping at Jun-11.

    Any help would be greatly appreciated.

    ltsolis
    Last edited by ltsolis; 09-09-2011 at 12:30 PM.

  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: Using a variable date to stop Summing when that date is reached

    You should change your designation to an actual date, like Jun-30-11, that's an actual date.

    With that, SUMIF() can do the work. Assuming column A is dates, B is values, and you've entered a date in D3, then this formula in E3:

    =SUMIF($A:$A, "<=" & D3, $B:$B)
    _________________
    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
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Using a variable date to stop Summing when that date is reached

    This worked very well.

    Thank you very much.

    ltsolis

+ 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