Firehazurd
New Member
- Joined
- Jun 9, 2015
- Messages
- 4
I've got an issue with how to pull out the sum product of a value (X) set based on the share of presence of A and B respectively. The main problem is that I can't actually see A and B explicitly as shown below. Instead I've got a reference that tells me that A runs from 11/4 to 12/30 and B runs from 12/9 to 2/3.
I've been working with trying to get a SUMPRODUCT formula to work, but it seems to struggle with it. I'm currently trying an array formula, but also not getting the results I know I should.
With the below example, I should be able to sum the -5 values from 11/4, 11/11 and 11/18 at a 100% rate for A, and then the -10 on 12/9 as a 50% rate for A and B. That means that A should total -20, while B totals -5.
I need to be able to accomplish this without adding any columns to the bigger table, and with the understanding that the A and B column don't actually exist, they're for visualizing purposes in this post only.
Here is the excel file I'm using as an example. https://drive.google.com/open?id=1CcNNN20GTcoxcEta-TUSfb9QydP-ZB2C
Currently, my terrible attempt is this:
[TABLE="class: grid, width: 196"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]J[/TD]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]100[/TD]
[TD]11/04/18[/TD]
[TD]12/30/18[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]B[/TD]
[TD]100[/TD]
[TD]12/09/18[/TD]
[TD]02/03/19[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 192"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]11/04/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]11/11/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]11/18/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]11/25/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]12/02/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]12/09/18[/TD]
[TD="align: center"]-10[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]12/16/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]12/23/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]12/30/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]01/06/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]01/13/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]01/20/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]01/27/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
</tbody>[/TABLE]
</m2),($k$2>
I've been working with trying to get a SUMPRODUCT formula to work, but it seems to struggle with it. I'm currently trying an array formula, but also not getting the results I know I should.
With the below example, I should be able to sum the -5 values from 11/4, 11/11 and 11/18 at a 100% rate for A, and then the -10 on 12/9 as a 50% rate for A and B. That means that A should total -20, while B totals -5.
I need to be able to accomplish this without adding any columns to the bigger table, and with the understanding that the A and B column don't actually exist, they're for visualizing purposes in this post only.
Here is the excel file I'm using as an example. https://drive.google.com/open?id=1CcNNN20GTcoxcEta-TUSfb9QydP-ZB2C
Currently, my terrible attempt is this:
Code:
{=IF(AND(C3:C25>=$L$2,C3:C25<m2),($k$2 sumifs(k2:k3,l2:l3,"="">="&C3:C25,M2:M3,"<"&C3:C25))*E3:E25,0)}
[TABLE="class: grid, width: 196"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]J[/TD]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]100[/TD]
[TD]11/04/18[/TD]
[TD]12/30/18[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]B[/TD]
[TD]100[/TD]
[TD]12/09/18[/TD]
[TD]02/03/19[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 192"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]11/04/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]11/11/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]11/18/18[/TD]
[TD="align: center"]-5[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]11/25/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]12/02/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]12/09/18[/TD]
[TD="align: center"]-10[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]12/16/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]12/23/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]12/30/18[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]01/06/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]01/13/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]01/20/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]01/27/19[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
</tbody>[/TABLE]
</m2),($k$2>