+ Reply to Thread
Results 1 to 5 of 5

Adding Data According to Date

  1. #1
    Registered User
    Join Date
    02-03-2010
    Location
    malta
    MS-Off Ver
    Excel 2003
    Posts
    46

    Adding Data According to Date

    Hi

    I have a sales sheet and column A has got the date of the month. Column B has the total sales for the date in Column A.

    The date is for every day for each month.

    How can i add the total sales according to the corresponding date so that I have a total of the sales for a monthly basis?

    Thanks in advance

    Ian

  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: Adding Data According to Date

    =SUMIF(B2:B4,B7,C2:C4)

    Where B2:b4 is the dates, c2:c4 is the values to sum and B7 is the date you wish to sum for!

    or

    =SUMIF(B2:B4,"01/01/2010",C2:C4)
    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 Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Adding Data According to Date

    Quote Originally Posted by ianmb
    The date is for every day for each month.

    How can i add the total sales according to the corresponding date so that I have a total of the sales for a monthly basis?
    If you're saying you wish to aggregate your data by month then I would suggest you use a Pivot Table and Group the date Field by Month & Year.

  4. #4
    Registered User
    Join Date
    02-03-2010
    Location
    malta
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Adding Data According to Date

    Hi,

    Thanks for your reply. I have tried it out but it is not wroking out. I amc not understanding what B7 is exactly.

    I am attaching a sample of the workbook maybe it can help. Some dates are repeated as the sales may be done by different reps and i want to keep them seperate.
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Adding Data According to Date

    It's up to you how you do this but if you want to avoid Pivots* then to keep things simple and calcs lightweight I would suggest you do the following:

    D2: =B2-DAY(B2)+1
    copied down

    change the values in I2:I5 such that they are real dates - ie enter 1/1/10 etc (apply custom format of mmm if you wish to alter appearance for aesthetic purposes)

    with the above in place

    J2: =SUMIF($D$2:$D$13,$I2,$C$2:$C$13)
    copied down

    there are plenty of alternatives to the above (two SUMIFs and/or SUMPRODUCT) but the above is pretty simple to implement.


    *because you may want to list all months irrespective of whether or not they have sales

+ 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