+ Reply to Thread
Results 1 to 3 of 3

Sumif based on column headers from source tab that move month over month

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    6

    Sumif based on column headers from source tab that move month over month

    Hi All,

    Having a hard time building a formula that will work for my situation.
    I will be downloading a report month-over-month in which the source data columns can expand or contract based on details that occur that month.
    But I need to populate a static template.

    My goal is to leave a tab to copy/paste the source data from my system and have a "Summary" tab containing the static template to sumif or pull the data from the source data tab based on the column headers on the source data tab.
    Reason I want to use the column headers on the source data tab is because the columns can shift and move month-over-month so your standard sumif formula won't work as I don't want to have to adjust the column the formula is looking at each month.
    When selecting the criteria ranges I'd like to be able to look at the entire column for row matching criteria and select the entire header row for column criteria instead of restricting myself to a specific cell range but I get an excel resource limitation error.
    I could do a compounding vlookup formula since the rows shouldn't duplicate but looking for a cleaner formula.

    This example is very simplified. I will have over 4,000 rows and over 50 columns of data.
    Game plan is to simply copy/paste the source data on the source tab and let summary tab template update itself.
    I've tried sumifs, index/match & sumproduct formulas but no luck.

    Any ideas?

    Thanks

    Capture.PNG
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Sumif based on column headers from source tab that move month over month

    Let's see if I can piece this together. It looks like you put all your stuff on one page, but that's not the way it is in the real wold.

    I am assuming that in the real world, you go out to some source, open it up and copy and paste it into a spreadsheet page. Column A has the month date. Then the next month you get the next source, open this same file, and copy and paste that information somewhere below the data for the previous month. The data begins a line below the month date.

    On the summary sheet, you want last month and current month regardless of how many months are on the raw data sheet. You are only interested in the headers shown on the summary sheet.

    Please confirm or correct.

    Are the number of locations fixed?

    Anything is possible with VBA, but this might also be accomplished using the offset command and dynamic ranges (if location number and names are fixed).
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sumif based on column headers from source tab that move month over month

    When selecting the criteria ranges I'd like to be able to look at the entire column for row matching criteria and select the entire header row for column criteria instead of restricting myself to a specific cell range but I get an excel resource limitation error.
    Would you post the formula that produces that error?

    That's a lot of data and SUMPRODUCT would be an array formula. That might be the bottle neck, but it might be something else. Having a look at that formula may save trying to re-invent the wheel ... or a flat tire.

    Also are you at liberty to fill in the blanks under the offset date headers in the source data? It's a fairly quick and simple procedure. That might facilitate a SUMIFS solution.
    Last edited by FlameRetired; 10-17-2018 at 07:20 PM.
    Dave

+ 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. [SOLVED] name column headers by date and days for a month
    By evamukha in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-26-2017, 04:02 AM
  2. SUMIF a month name based on a column of dates
    By lorber123 in forum Excel General
    Replies: 3
    Last Post: 06-24-2016, 09:25 PM
  3. Replies: 7
    Last Post: 05-26-2016, 01:49 PM
  4. [SOLVED] Summary by Month Using Dates in Column Headers
    By glennchung in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2014, 01:19 PM
  5. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  6. [SOLVED] SUMIF month equals today's month
    By bbrunof in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-05-2013, 02:59 PM
  7. [SOLVED] display cell to show only Month/year to do sumif calc if today()= any day of month
    By fireguy7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2013, 06:55 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