+ Reply to Thread
Results 1 to 8 of 8

Sum multiple columns based on multiple variables

  1. #1
    Registered User
    Join Date
    01-19-2009
    Location
    earth
    MS-Off Ver
    2013
    Posts
    19

    Sum multiple columns based on multiple variables

    Guys,

    I'm looking to find a formula to calculate the red cell (actually all the cells in the "type" fields) by determining:

    1) If the Product in the table matches the one in row 3
    2) If the dates in table columns H, J, L, N and P took place in the month before the billing date
    3) If those two conditions are met, sum the matching columns in I, K, M, O and Q.

    For example for the red cell would currently equal $11,380.02 as the only revenue collection dates in range would be cells I1 through I3.

    Any help would be greatly appreciated. I'm sure there is a better way to set this up as well, but after three days of pretty serious number crunching and forecasting, my brain is mush.

    Thanks
    example.xlsx

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Sum multiple columns based on multiple variables

    I1:I3?
    How did you get your result?
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    01-19-2009
    Location
    earth
    MS-Off Ver
    2013
    Posts
    19

    Re: Sum multiple columns based on multiple variables

    I don't understand what you are referring to? I1 and I2 are blank, and I3 is a header row. Are you looking at I24, etc?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum multiple columns based on multiple variables

    I have to agree with Robert - you say in your original post: "the only revenue collection dates in range would be cells I1 through I3.

    Could you please clarify?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Sum multiple columns based on multiple variables

    =SUM(IF(Table2[Product]=C$3,IF(MONTH(Table2[[Date +30]:[Date +120+]])=MONTH($A4),IF(YEAR(Table2[[Date +30]:[Date +120+]])=YEAR($A4),Table2[[Exp Rev 30]:[Exp Rev 120+]]))))
    Confirm COntrl+shift+Enter
    Drag accross

  6. #6
    Registered User
    Join Date
    01-19-2009
    Location
    earth
    MS-Off Ver
    2013
    Posts
    19

    Re: Sum multiple columns based on multiple variables

    Ahhh, I see - typo on my part. Sorry it was a long day of data crunching and I had to type that out twice as I lost the post when I hit backspace once ...

    That should have read I36 through I38. I got my wires crossed looking at the order number (1-3) instead of the row number.

    Apologies.

    Robert, trying your solution now.

  7. #7
    Registered User
    Join Date
    01-19-2009
    Location
    earth
    MS-Off Ver
    2013
    Posts
    19

    Re: Sum multiple columns based on multiple variables

    Almost perfect and I've never tried table[product] before!

    I just need it to calculate the previous month rather than current. I can fix that easily by adjusting columns for "Complete Date" and then +1 month in the next column for "Bill Date"

    Thanks!

  8. #8
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Sum multiple columns based on multiple variables

    You have mentioned previous month but as it shows on your workbook you are reffering to current month.

    Pleae add rep if you happy with solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Comparing two columns with multiple variables
    By Tkombz in forum Excel General
    Replies: 2
    Last Post: 04-09-2013, 12:35 AM
  2. Macro to Segregate the data based on Multiple Criteria's in Multiple Columns -Challenging!
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-08-2012, 07:31 AM
  3. Compare multiple columns with multiple variables
    By rfisc270 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-15-2010, 10:40 AM
  4. Max based on multiple variables with multiple parameters
    By Latszer in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 10-09-2009, 03:39 AM
  5. Need to test for multiple variables in columns
    By donoisbono in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2007, 03:18 PM

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