Results 1 to 4 of 4

Sum across columns based on column headers or count of columns

Threaded View

  1. #1
    Registered User
    Join Date
    05-17-2010
    Location
    Tennessee
    MS-Off Ver
    Office365
    Posts
    24

    Sum across columns based on column headers or count of columns

    I'm writing a macro using Office 365. I'm a beginning/intermediate vba coder. I only get the opportunity every now and then so I feel my way through.

    A piece of the macro needs to be as follows:

    Workbook Setup:
    I have two sheets in a workbook.
    One has a pivot table summing the revenue of customers by month date for 1 year. Columns = months, Rows = Customers
    The second sheet is a pivot table in the same format, for different. On the second sheet however, there is only a partial years data. So on the first sheet there is Jan-Dec and on the second, only Jan-Mar. The amount number of months on the second sheet changes so it needs to be versatile depending on when the report is run.

    What I need them to do:
    I need to create a column on the second sheet, at the end of the pivot table, that sums the same months from the first sheet on each row. So, if the second pivot table has months Jan-Apr, I need to the macro to sum across the totals for only Jan-Apr from the first pivot table.

    I have attached a workbook that hopefully will make this a little clearer. Any suggestions or code on how to approach this would be very helpful.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. copy and paste columns based on column headers
    By patwary786 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-24-2015, 11:43 PM
  2. Replies: 1
    Last Post: 06-19-2014, 06:35 PM
  3. Get value based on columns and row headers
    By KJL in forum Excel General
    Replies: 2
    Last Post: 05-06-2014, 01:36 PM
  4. Count Number of occurences Across Columns based on Similar Column Headers
    By vidyuthrajesh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-27-2013, 06:42 PM
  5. Summary - Copy the columns based on column headers
    By rafiomeon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2012, 10:32 AM
  6. Create a new column based on count of two other columns
    By ftcnt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 09:10 AM
  7. Macro to Sum Columns based on Headers
    By Jluc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2011, 02:36 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