+ Reply to Thread
Results 1 to 7 of 7

Summing items in a table matrix form

Hybrid View

  1. #1
    Registered User
    Join Date
    04-18-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Summing items in a table matrix form

    I have a spreadsheet that has various columns titled with a date (last day of each month) and this is populated each month that passes. Each row has a code and these can duplicate. What I need to do is sum all the same codes together for a specific month. But I need this to be automatic where I don't change it each month manually. I have a tab that just has some variables which are the current month and the prior month data. So off of this tab I know which month (column) to look for in the table and hence pull the data. My issue is locating that column. I have tried using a pivot table and then a vlookup and it works great if I hardcode the column to pull the data from. But I don't want to hardcode this as I just want to put in the current month in the variables tab and have this populate automatically. And referencing a date in the pivot table was not working for me. So then I was thinking of using a Sumif function and having an additional row at the top with a 1 (conditional formula) if that is the current month. But I still need to be able to locate which exact column has the 1 in it and then reference that in the sumif. How would I do that necessarily? R1C1 format, but exactly how? I could use the index function to find the location of the 1 in the row, but then need a way to tell the sumif function which column is the 6th column in the spreadsheet for example.
    So the problem is like this:

    On one spreadsheet I have this table:

    11/30/13 12/30/13 1/31/14 2/28/14 3/31/14 .... and can go all the way out until 12/31/16 say
    ABC 5 8 3 7 5
    CDF 10 3 4 1 3
    ABC 12 2 5 1 2
    GHI 3 15 8 3 5
    XYZ 2 7 9 5 5
    GHI 1 6 10 2 3

    On another spreadsheet I have this information:

    Current month 3/31/14

    And then on other spreadsheets I am looking to gather data from the 1st spreadsheet in a format such as this:
    Current Month Prior Month
    ABC 7 8
    CDF 3 1
    GHI 8 5
    XYZ 5 5

    So I need these to be sums and need to be able to pull from just that one particular column. If anyone has some suggestions PLEASE let me know!! I have been puzzled on this for hours!!
    Thank you soooooooooooo much in advance!!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Summing items in a table matrix form

    Post an example workbook and I'll show you how.

  3. #3
    Registered User
    Join Date
    04-18-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Summing items in a table matrix form

    Ok great. I created a sample workbook in excel and tried to attach it but am not sure how to here. Can you tell me? sorry I am new to this. Thank you!

  4. #4
    Registered User
    Join Date
    04-18-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Summing items in a table matrix form

    Ok. I got it. here is the sample - thank you!
    Attached Files Attached Files

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Summing items in a table matrix form

    Happy to help.

    Don't forget you mark the thread as SOLVED if you're satisfied you have your solution.

    BSB.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Summing items in a table matrix form

    Try the below formula in cell D8 of the Summary worksheet. You can then copy it to the other relevant cells and it should produce what I think you mean.

    =SUMPRODUCT((source!$D$4:$Q$4=D$6)*(source!$A$6:$A$41=$A8),source!$D$6:$Q$41)
    Last edited by BadlySpelledBuoy; 04-18-2014 at 12:01 PM.

  7. #7
    Registered User
    Join Date
    04-18-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Summing items in a table matrix form

    Yes this works great - thank you!!

+ 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. trying to display a pivot table in a matrix form
    By nmss18 in forum Excel General
    Replies: 0
    Last Post: 07-19-2011, 01:59 PM
  2. Summing the items of each of different groups in a table
    By Michael6 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-25-2009, 06:10 AM
  3. order form with multiple items and sizes for items
    By Bernard56 in forum Excel General
    Replies: 1
    Last Post: 01-17-2006, 07:50 PM
  4. Selective summing of table items?
    By John in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2006, 06:50 PM
  5. [SOLVED] Summing Columns-revolves around summing particular items
    By savv32 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2005, 09:05 PM

Tags for this Thread

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