Cumulative sum based on Row and Column criteria

Citron

New Member
Hi,

I would like to do a cumulative sum based on Row and Column criteria :

I would like to do the cumulative month (Year to date)
In the last colomn, I'd like to have the cumul of all the "CY_A_IT_1" for each Items.
A B C D E F
CY_A_IT_1CY_A_IT_1CY_A_IT_1CY_ACY_ACY_A_IT_1
ItemsJanFebMarAprMayCumul YTD
B552451448552
C20212580
D44250
E20245
F52250

<tbody>
</tbody>













<colgroup><col><col><col><col><col span="3"></colgroup><tbody>
</tbody>
I tried with SUMIF($B$1:$B$5,$B$1,INDEX($B$3:$F$7,0,MATCH($A3,$A$3:$A$7))) but it doesn't work and I don't understand why. I find just the first result but when I drag the formula the other result are wrong...

How can I do that? I have office 365

Thank you so much for your help
 

Eric W

MrExcel MVP
Welcome to the Board.

I'm not clear on your requirements, but try:

ABCDEFGH
1CY_A_IT_1CY_A_IT_1CY_A_IT_1CY_ACY_ACY_A_IT_1
2ItemsJanFebMarAprMayCumul YTD
3B552451448552741
4C2021258043
5D4425010
6E202454
7F522509

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
G3=SUMIF($B$1:$F$1,G$1,B3:F3)

<tbody>
</tbody>

<tbody>
</tbody>
 

Some videos you may like

This Week's Hot Topics

  • Get External Data (long shot question!)
    This is likely a long shot but I am wondering if it is at all possible for Excel to somehow 'change' the contents of a URL that is being linked to...
  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • Cell Formatting
    Good Morning, I need to format a few different cells in the following manners: A1 has to always add a colon (:) after whatever is typed in by a...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • Workbook_Change stopped working !
    I am working on an app to speed up & automate processing of Credit Cards statements. After data is input from a CSV file, it is presented to the...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
Top