# 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_1 CY_A_IT_1 CY_A_IT_1 CY_A CY_A CY_A_IT_1 Items Jan Feb Mar Apr May Cumul YTD B 552 45 144 85 52 C 20 21 2 58 0 D 4 4 2 5 0 E 2 0 2 4 5 F 5 2 2 5 0

<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>

1,078,504
Messages
5,340,766
Members
399,394
Latest member
farlow

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...