# Cumulative SumIF or Index match across multiple columns

1. ## Cumulative SumIF or Index match across multiple columns

Hi all, first time poster, long time googler here.

My issue is I am looking for a cumulative sumif or index match type solution to solve my problem (example attached). I have data over 2 sheets, first sheet is where I want the cumulative totals to be listed by month (in columns) and the second sheet is where the data is stored and it can be in any order in the rows on the sheet and will be added to over time, that's why I don't want to use a fixed =SUM formula as the order of the rows could change.

2. ## Re: Cumulative SumIF or Index match across multiple columns

Hi Andy and welcome to the forum,

I've seen better sample data files . I couldn't quite understand what you wanted , so I made my own data in the attached . Then I did a Pivot Table which I think you are looking for. Learn more about Pivot Tables and Dynamic Named Ranges and I think it will do what you want.
P{ivot Running Total by Column Date.xlsx

3. ## Re: Cumulative SumIF or Index match across multiple columns

Thanks Marvin P. I know how to do a pivot table so not exactly what I was looking for, it will work however if there is no other solution. I have added some more notes to my example and re uploaded it.

4. ## Re: Cumulative SumIF or Index match across multiple columns

This proposal inserts a column (C) into the table on the summary sheet.
The formula for cell D6 is: =SUM(INDEX(Data!C:C,MATCH(\$B6,Data!\$B:\$B,0),1),C6)
Let us know if you have any questions.

5. ## Re: Cumulative SumIF or Index match across multiple columns

Here is a formula you could paste into cell C6 (file attached to post #3) that does not require inserting another column: =SUMPRODUCT((Data!\$B\$6:\$B\$21=\$B6)*(Data!\$C\$6:C\$21))
After pasting into cell C6 drag the fill handle down and across.
Let us know if you have any questions.

6. ## Re: Cumulative SumIF or Index match across multiple columns

Hi there JeteMc. The sum product is perfect thanks!

7. ## Re: Cumulative SumIF or Index match across multiple columns

You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

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