+ Reply to Thread
Results 1 to 7 of 7

add numbers based on date reference

  1. #1
    Registered User
    Join Date
    12-22-2010
    Location
    romania
    MS-Off Ver
    Excel 2010
    Posts
    4

    add numbers based on date reference

    hi everybody!

    i need your help for a smal problem.

    i have a column with dates and a column with coresponding numbers. i want to add the numbers, whose coresponding date is less or equal to a certain date.
    i`ve tried sumif, but no succes.
    any ideas?
    Last edited by elements; 12-22-2010 at 07:19 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445

    Re: add numbers based on date reference

    How about something along these lines

    =SUMIF(A1:A30,">"&DATEVALUE("18/1/2010"),B1:B30)

    This will return a sum of values in B1:B30 where the date in A1:A30 is after 18/1/2010
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    12-18-2010
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010
    Posts
    79

    Re: add numbers based on date reference

    You might consider using the SUMPRODUCT function
    David
    Access and Excel Developer | UK

  4. #4
    Registered User
    Join Date
    12-22-2010
    Location
    romania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: add numbers based on date reference

    works like a charm sweep, except for one little thing. i want that my formula updates the date with the curent date. i`ve tried replacing "DATEVALUE("18/1/2010")" with today() function, but it says: volatine.

  5. #5
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445

    Re: add numbers based on date reference

    This works for me:

    =SUMIF(A1:A30,">"&TODAY(),B1:B30)

    is that what you have?

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445

    Re: add numbers based on date reference

    Just a note regarding SUMPRODUCT:

    =SUMPRODUCT((A1:A30>DATEVALUE("18/1/2010"))*(B1:B30))

    You could use it, but, it is an array formula, and therefore more resource hungry (and therefore slower) than the SUMIF.

  7. #7
    Registered User
    Join Date
    12-22-2010
    Location
    romania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: add numbers based on date reference

    now it works. i was missing someting.
    thanks a lot sweep and BigDat6CC!
    Last edited by elements; 12-22-2010 at 07:25 AM.

+ 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