sum rows in range change column

mophsus

New Member
Joined
Jun 13, 2019
Messages
3
Hi all,

I´m trying to sum some rows with the same criteria in column "A", the criteria that changes, changes by month, i mean this month use march, next april and so on the criteria changes in the report, obviously the report is in another sheet

Cód. Aux./Dpto.Balances AIFRS (AUD) JanuaryBalances AIFRS (AUD) FebruaryBalances AIFRS (AUD) MarchBalances AIFRS (AUD) April
55230041,650.1640,436.41110,196.15114,788.05
552315-1,387,469.69-1,387,469.69-1,387,469.69-1,387,469.69
552301-4,321,908.98-4,321,908.98-4,321,908.98-4,321,908.98
552301-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35
552301-41,650.16-40,436.41-41,613.89-43,347.95
55230100-68,582.26-71,440.10
5523020000
552303-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35
552304-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35

<tbody>
</tbody>

and in my report i change the month

Balances AIFRS (AUD) March
552301

<tbody>
</tbody>

Next month it will be:

Balances AIFRS (AUD) April
552301

<tbody>
</tbody>

i tried with sumifs and/or index match in sinple & matrix form but it does not work, any idea? please

Thanks in advance
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Here's ONE way...I'm sure there are others.

If your data (with headers) is in A1:E10 (or an extended version of that),

Form a cell to show only the month name when you enter, for example, 3/1/2019 for March.
For a test, I put 552301 in H3 and used the following formula in H4. B2:E10 represents all of the data rows by the month columns (could be 12 months, then that would be to M).

Code:
=SUMPRODUCT((A2:A10=H3)*(INDEX(B2:E10,,MONTH(H2))))

and it returned -7,221,730.48
 
Last edited:
Upvote 0
Try this

<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:106.46px;" /><col style="width:188.2px;" /><col style="width:200.55px;" /><col style="width:178.69px;" /><col style="width:182.5px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td >Cód. Aux./Dpto.</td><td >Balances AIFRS (AUD) January</td><td >Balances AIFRS (AUD) February</td><td >Balances AIFRS (AUD) March</td><td >Balances AIFRS (AUD) April</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">552300</td><td style="text-align:right; ">41,650.16</td><td style="text-align:right; ">40,436.41</td><td style="text-align:right; ">110,196.15</td><td style="text-align:right; ">114,788.05</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="text-align:right; ">552315</td><td style="text-align:right; ">-1,387,469.69</td><td style="text-align:right; ">-1,387,469.69</td><td style="text-align:right; ">-1,387,469.69</td><td style="text-align:right; ">-1,387,469.69</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="text-align:right; ">552301</td><td style="text-align:right; ">-4,321,908.98</td><td style="text-align:right; ">-4,321,908.98</td><td style="text-align:right; ">-4,321,908.98</td><td style="text-align:right; ">-4,321,908.98</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">552301</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="text-align:right; ">552301</td><td style="text-align:right; ">-41,650.16</td><td style="text-align:right; ">-40,436.41</td><td style="text-align:right; ">-41,613.89</td><td style="text-align:right; ">-43,347.95</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="text-align:right; ">552301</td><td style="text-align:right; ">0</td><td style="text-align:right; ">0</td><td style="text-align:right; ">-68,582.26</td><td style="text-align:right; ">-71,440.10</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="text-align:right; ">552302</td><td style="text-align:right; ">0</td><td style="text-align:right; ">0</td><td style="text-align:right; ">0</td><td style="text-align:right; ">0</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="text-align:right; ">552303</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="text-align:right; ">552304</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td><td style="text-align:right; ">-2,789,625.35</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >12</td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >13</td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >14</td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >15</td><td > </td><td >Balances AIFRS (AUD) March</td><td > </td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >16</td><td style="text-align:right; ">552301</td><td style="text-align:right; ">-7,221,730.48</td><td > </td><td > </td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B16</td><td >=SUMIF($A$2:$A$10,A16,INDEX($B$2:$E$10,0,MATCH(B15,$B$1:$E$1,0)))</td></tr></table></td></tr></table>
 
Upvote 0

Book1
ABCDE
1Cd. Aux./Dpto.Balances AIFRS (AUD) JanuaryBalances AIFRS (AUD) FebruaryBalances AIFRS (AUD) MarchBalances AIFRS (AUD) April
255230041,650.1640,436.41110,196.15114,788.05
3552315-1,387,469.69-1,387,469.69-1,387,469.69-1,387,469.69
4552301-4,321,908.98-4,321,908.98-4,321,908.98-4,321,908.98
5552301-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35
6552301-41,650.16-40,436.41-41,613.89-43,347.95
755230100-68,582.26-71,440.10
85523020000
9552303-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35
10552304-2,789,625.35-2,789,625.35-2,789,625.35-2,789,625.35
11
12
13MonthMarch
14Cd. Aux./Dpto.552301
15Amount(7,221,730.48)
Sheet5
Cell Formulas
RangeFormula
C15=SUMPRODUCT((A2:A10=C14)*(INDEX(B2:E10,,MONTH(C13))))
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top