Somebody will probably come up with an easier solution, but until that happens, please try this. I assumed you wanted to eventually add up more rows of data in each column so I created some dummy data. Cells A2 and B2 are the answer. Column A and B are added to summarize the values. Range C2:F2 are formulas to test based on the value in C1.
Jeff
Excel 2012
| A | B | C | D | E | F |
---|
17/04 | | | | | | |
Before | Before | After | After | | | |
Before | After | 17/02 | 17/03 | 17/04 | 17/05 | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]697[/TD]
[TD="align: right"]782[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]32[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]11[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]36[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]14[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]37[/TD]
[TD="align: right"]42[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]16[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]44[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]17[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]41[/TD]
[TD="align: right"]46[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]18[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]48[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]19[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]20[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]47[/TD]
[TD="align: right"]52[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]21[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]49[/TD]
[TD="align: right"]54[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]32[/TD]
[TD="align: right"]22[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]23[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]53[/TD]
[TD="align: right"]58[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]24[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]25[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]57[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]36[/TD]
[TD="align: right"]26[/TD]
</tbody>
Sheet1
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A2[/TH]
[TD="align: left"]=SUM(
A4:A20)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B2[/TH]
[TD="align: left"]=SUM(
B4:B20)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C2[/TH]
[TD="align: left"]=IF(
C3<$C$1,"Before","After")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D2[/TH]
[TD="align: left"]=IF(
D3<$C$1,"Before","After")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E2[/TH]
[TD="align: left"]=IF(
E3<$C$1,"Before","After")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]=IF(
F3<$C$1,"Before","After")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A4[/TH]
[TD="align: left"]=SUMIFS(
C4:F4,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B4[/TH]
[TD="align: left"]=SUMIFS(
C4:F4,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A5[/TH]
[TD="align: left"]=SUMIFS(
C5:F5,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B5[/TH]
[TD="align: left"]=SUMIFS(
C5:F5,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A6[/TH]
[TD="align: left"]=SUMIFS(
C6:F6,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B6[/TH]
[TD="align: left"]=SUMIFS(
C6:F6,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A7[/TH]
[TD="align: left"]=SUMIFS(
C7:F7,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B7[/TH]
[TD="align: left"]=SUMIFS(
C7:F7,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A8[/TH]
[TD="align: left"]=SUMIFS(
C8:F8,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B8[/TH]
[TD="align: left"]=SUMIFS(
C8:F8,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A9[/TH]
[TD="align: left"]=SUMIFS(
C9:F9,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B9[/TH]
[TD="align: left"]=SUMIFS(
C9:F9,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A10[/TH]
[TD="align: left"]=SUMIFS(
C10:F10,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B10[/TH]
[TD="align: left"]=SUMIFS(
C10:F10,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A11[/TH]
[TD="align: left"]=SUMIFS(
C11:F11,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B11[/TH]
[TD="align: left"]=SUMIFS(
C11:F11,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A12[/TH]
[TD="align: left"]=SUMIFS(
C12:F12,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B12[/TH]
[TD="align: left"]=SUMIFS(
C12:F12,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A13[/TH]
[TD="align: left"]=SUMIFS(
C13:F13,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B13[/TH]
[TD="align: left"]=SUMIFS(
C13:F13,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A14[/TH]
[TD="align: left"]=SUMIFS(
C14:F14,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B14[/TH]
[TD="align: left"]=SUMIFS(
C14:F14,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A15[/TH]
[TD="align: left"]=SUMIFS(
C15:F15,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B15[/TH]
[TD="align: left"]=SUMIFS(
C15:F15,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A16[/TH]
[TD="align: left"]=SUMIFS(
C16:F16,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B16[/TH]
[TD="align: left"]=SUMIFS(
C16:F16,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A17[/TH]
[TD="align: left"]=SUMIFS(
C17:F17,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B17[/TH]
[TD="align: left"]=SUMIFS(
C17:F17,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A18[/TH]
[TD="align: left"]=SUMIFS(
C18:F18,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B18[/TH]
[TD="align: left"]=SUMIFS(
C18:F18,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A19[/TH]
[TD="align: left"]=SUMIFS(
C19:F19,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B19[/TH]
[TD="align: left"]=SUMIFS(
C19:F19,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A20[/TH]
[TD="align: left"]=SUMIFS(
C20:F20,$C$2:$F$2,A$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B20[/TH]
[TD="align: left"]=SUMIFS(
C20:F20,$C$2:$F$2,$B$3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C5[/TH]
[TD="align: left"]=1+C4[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D5[/TH]
[TD="align: left"]=1+D4[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E5[/TH]
[TD="align: left"]=1+E4[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F5[/TH]
[TD="align: left"]=1+F4[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C6[/TH]
[TD="align: left"]=1+C5[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D6[/TH]
[TD="align: left"]=1+D5[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E6[/TH]
[TD="align: left"]=1+E5[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F6[/TH]
[TD="align: left"]=1+F5[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C7[/TH]
[TD="align: left"]=1+C6[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D7[/TH]
[TD="align: left"]=1+D6[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E7[/TH]
[TD="align: left"]=1+E6[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F7[/TH]
[TD="align: left"]=1+F6[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C8[/TH]
[TD="align: left"]=1+C7[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D8[/TH]
[TD="align: left"]=1+D7[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E8[/TH]
[TD="align: left"]=1+E7[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F8[/TH]
[TD="align: left"]=1+F7[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C9[/TH]
[TD="align: left"]=1+C8[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D9[/TH]
[TD="align: left"]=1+D8[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E9[/TH]
[TD="align: left"]=1+E8[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F9[/TH]
[TD="align: left"]=1+F8[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C10[/TH]
[TD="align: left"]=1+C9[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D10[/TH]
[TD="align: left"]=1+D9[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E10[/TH]
[TD="align: left"]=1+E9[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F10[/TH]
[TD="align: left"]=1+F9[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C11[/TH]
[TD="align: left"]=1+C10[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D11[/TH]
[TD="align: left"]=1+D10[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E11[/TH]
[TD="align: left"]=1+E10[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F11[/TH]
[TD="align: left"]=1+F10[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C12[/TH]
[TD="align: left"]=1+C11[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D12[/TH]
[TD="align: left"]=1+D11[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E12[/TH]
[TD="align: left"]=1+E11[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F12[/TH]
[TD="align: left"]=1+F11[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C13[/TH]
[TD="align: left"]=1+C12[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D13[/TH]
[TD="align: left"]=1+D12[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E13[/TH]
[TD="align: left"]=1+E12[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F13[/TH]
[TD="align: left"]=1+F12[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C14[/TH]
[TD="align: left"]=1+C13[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D14[/TH]
[TD="align: left"]=1+D13[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E14[/TH]
[TD="align: left"]=1+E13[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F14[/TH]
[TD="align: left"]=1+F13[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C15[/TH]
[TD="align: left"]=1+C14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D15[/TH]
[TD="align: left"]=1+D14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E15[/TH]
[TD="align: left"]=1+E14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F15[/TH]
[TD="align: left"]=1+F14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C16[/TH]
[TD="align: left"]=1+C15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D16[/TH]
[TD="align: left"]=1+D15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E16[/TH]
[TD="align: left"]=1+E15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F16[/TH]
[TD="align: left"]=1+F15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C17[/TH]
[TD="align: left"]=1+C16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D17[/TH]
[TD="align: left"]=1+D16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E17[/TH]
[TD="align: left"]=1+E16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F17[/TH]
[TD="align: left"]=1+F16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C18[/TH]
[TD="align: left"]=1+C17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D18[/TH]
[TD="align: left"]=1+D17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E18[/TH]
[TD="align: left"]=1+E17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F18[/TH]
[TD="align: left"]=1+F17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C19[/TH]
[TD="align: left"]=1+C18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D19[/TH]
[TD="align: left"]=1+D18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E19[/TH]
[TD="align: left"]=1+E18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F19[/TH]
[TD="align: left"]=1+F18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C20[/TH]
[TD="align: left"]=1+C19[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D20[/TH]
[TD="align: left"]=1+D19[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E20[/TH]
[TD="align: left"]=1+E19[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F20[/TH]
[TD="align: left"]=1+F19[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]