+ Reply to Thread
Results 1 to 4 of 4

Sum values by month for charting

  1. #1
    Registered User
    Join Date
    03-15-2007
    Posts
    50

    Sum values by month for charting

    Sorry if this is a duplicate post, I was in the middle of typing my post and I hit something with my pinky and it disappeared.

    I ahve a series of invoice values in columns a & b and the dates of those invoices in column c. I am trying to program a macro to total all invoice values by month & year, and put that data elsewhere so I can chart monthly billings. I tried SUMIF but did not have any luck getting it to work. Data is laid out:

    Invoice value A Invoice value b Invoice date
    $$$$ $$$$ mm/dd/yy

    thanks

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    This formula would get you the total of values in columns A and B (well, A1:A5 and B1:B5, for this example) for the month of January in 2007:

    Please Login or Register  to view this content.
    For February, change the red 1 to 2. Or, for another year, change the red 2007 to another year.

    Depending on your data layout, this might be simplified by referencing a cell that contains the criteria, or by referencing row/column values, but we'd have to see a copy of your data in order to get that specific.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Try this UDF.

    =sumOfMonth(myDate) can be used in a spreadsheet formula.

    If the value in column C is a date in the same month as myDate then the values in columns A and B on that row are added into sumOfMonth.

    You may need to change the name of the sheet where you keep your data.
    Please Login or Register  to view this content.
    I'm not sure, but I'll betcha that the SUMPRODUCT is faster than this.

  4. #4
    Registered User
    Join Date
    03-15-2007
    Posts
    50
    Thanks for the input. I'll give these a try tomorrow after I finish paying my taxes.

+ 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