+ Reply to Thread
Results 1 to 9 of 9

Monthly Progression

  1. #1
    Registered User
    Join Date
    05-29-2008
    Posts
    14

    Monthly Progression

    Hi all!

    Well, here's the thing (see attached example please): Given a revenue report I export from our CRM, I need to calculate the progression of our Marketing Campaigns, based on: a) the date the deal is created in and b) the SourceCode (identifier) of each campaign. I built a table so I can later make a nice graph.

    I know it shouldn't be hard, but I´m still new to excel, so can you guys pls help?

    Here are some example of what I need (again, see attached file for a more clear example)

    In C23 = The SUM of column D, where the SourceCode is W1 and creation date within the month of May.
    In D23 = Same thing but for the month of June

    I'm using Excel 2007 if that helps..

    Thanks!!

    Ale
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    First thing -- change your values in row 21 to be dates... eg C21 should be entered as May 1st, D21 Jun 1st etc.... you can format row C21 as "mmm" to show only the month name but having dates in these cells will make your life a lot easier.

    Once the above is done you can use a SUMPRODUCT

    C23: =SUMPRODUCT(--($E$4:$E$18=$B23),--(($C$4:$C$18-DAY($C$4:$C$18))+1=C$21),$D$4:$D$18)

    the above can then be copied across the range.

    In XL07 you also have SUMIFS but to use this you would need to add another field to your table which holds the month in a way you can cross check with the date in row 21.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Pivot Table solution

    You can also use a Pivot Table ( in this case it's easier done than said !)
    Step 1: as Donkey pointed out, col C should contain dates
    Select the range
    Go to Data - Select Text to columns - Select delimited - Next - Next
    In column data format select date and select MDY - Ok
    Next select a cell in your range

    Step 2 : Go to data - Pivot Table
    Follow the wizard setting Creation date and Source code as column fields and Amount as Data field
    Select a date in this table
    Right click
    Select Group and...
    Select Group
    Then group by month
    Voilà

    As you will no doubt add rows in your range you will need to use a dynamic range
    When building the PT, insert the defined name instead of the range

    HTH
    Attached Files Attached Files
    Last edited by arthurbr; 10-28-2008 at 04:52 AM.

  4. #4
    Registered User
    Join Date
    05-29-2008
    Posts
    14
    Hi there!! I´ll try your solution first, thanks for answering.

    A question though: what if I would need to match a number of source codes to a list? That is, instead of checking if "W1" is present, the function should check if any of the values in a list called W1 are present (i.e.: W1.1, W1.2, W1.3, etc)
    ?

    Should I use a match formula there?

    Thanks

    Alejandro

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Post an example of what you have in mind?

  6. #6
    Registered User
    Join Date
    05-29-2008
    Posts
    14
    Hi! Sorry for the delay, I was out of office all day.

    I´m attaching the modified example. I need to do the same as commented on the original post, though now you will see that W1, W2, W3 and W4 are groups of different SourceCodes.

    So now:

    In C23 = The SUM of column D, where the SourceCode is any of the ones in the W1 group and creation date within the month of May.

    Hope you can help

    Thanks again!

    Ale
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    First things first: never use merged cells if you need to use their values in formulae. They are nothing but trouble.
    You can use them to make your sheet look nice, but it's best to keep it at that

    To solve your problem I added a helper column to your table so that the Sourcecode values (W1...) can be added...
    Starting from there use my previous post to creat your PT
    Attached Files Attached Files

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Not meant to be an improvement of arthurbr's use of PT (which is most likely the better solution for you pending on usage of data) but meant to illustrate how you could extend Sumproduct for your scenario see attached.
    Attached Files Attached Files

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    For some reason the wrong file was uploaded... grr.

    See attached.
    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