Good Morning,
I was hoping someone might be able to help me out with the following question:
I have built a spreadsheet that generates data on a monthly basis for 100 distinct "blocks" (January through December, vertically oriented, 100 times; the example below features only 2 months for 1 of those 100 12-month "blocks"), with each month containing several identical categories (two of which are "Exp. X" and "Exp. Losses").
Column B features all of the listed categories and Columns C through V represent unique situations based on years, as such:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 1[/TD]
[TD="align: center"]1999 Data[/TD]
[TD="align: center"]2000 Data[/TD]
[TD="align: center"]2001 Data[/TD]
[TD="align: center"]2002 Data[/TD]
[TD="align: center"]2003 Data[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 2[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Exp. X[/TD]
[TD="align: center"]$500[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"]$300[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$400[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Exp. Losses[/TD]
[TD="align: center"]($50)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($100)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($200)[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 5[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 6[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 7[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 1
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""
[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 2
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Exp. X
[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$300[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$500[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Exp. Losses
[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($25)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]$0[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 5
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 6
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 7
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]"'[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
</tbody>[/TABLE]
Would it be possible to SUM all of the Exp. X numbers in Column C (which would encompass both the January and February results of course), but only those that also feature a loss in Exp. Losses?
Meaning, something along the lines of SUMIFS(B1:B15,"*Exp. X*",C1:C15) but then only if AND(B1:B15,"*Exp. Losses*",C1:C15,"<0"). I am trying to pair the SUM of the Exp. X with only the cells that also feature a negative number in the Exp. Losses cell.
The actual results for Column C would equal $500, because the $200 Exp. X in the month of February does not feature a loss in the Exp. Loss category.
Any help with crafting the formula would be greatly appreciated!
Many thanks,
HGL
I was hoping someone might be able to help me out with the following question:
I have built a spreadsheet that generates data on a monthly basis for 100 distinct "blocks" (January through December, vertically oriented, 100 times; the example below features only 2 months for 1 of those 100 12-month "blocks"), with each month containing several identical categories (two of which are "Exp. X" and "Exp. Losses").
Column B features all of the listed categories and Columns C through V represent unique situations based on years, as such:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 1[/TD]
[TD="align: center"]1999 Data[/TD]
[TD="align: center"]2000 Data[/TD]
[TD="align: center"]2001 Data[/TD]
[TD="align: center"]2002 Data[/TD]
[TD="align: center"]2003 Data[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 2[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Exp. X[/TD]
[TD="align: center"]$500[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"]$300[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$400[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Exp. Losses[/TD]
[TD="align: center"]($50)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($100)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($200)[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 5[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 6[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]JAN.[/TD]
[TD="align: center"]Category 7[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 1
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""
[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 2
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Exp. X
[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$300[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$500[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Exp. Losses
[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]($25)[/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"]$0[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 5
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 6
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]FEB.[/TD]
[TD="align: center"]Category 7
[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]"'[/TD]
[TD="align: center"]""[/TD]
[TD="align: center"]""[/TD]
[/TR]
</tbody>[/TABLE]
Would it be possible to SUM all of the Exp. X numbers in Column C (which would encompass both the January and February results of course), but only those that also feature a loss in Exp. Losses?
Meaning, something along the lines of SUMIFS(B1:B15,"*Exp. X*",C1:C15) but then only if AND(B1:B15,"*Exp. Losses*",C1:C15,"<0"). I am trying to pair the SUM of the Exp. X with only the cells that also feature a negative number in the Exp. Losses cell.
The actual results for Column C would equal $500, because the $200 Exp. X in the month of February does not feature a loss in the Exp. Loss category.
Any help with crafting the formula would be greatly appreciated!
Many thanks,
HGL