Dynamic Share Array Issue

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:

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

JKLM
2A10011/04/1812/30/18
3B10012/09/1802/03/19

<tbody>
</tbody>


CEGH
XAB
311/04/18-5100
411/11/18-5100
511/18/18-5100
611/25/18100
712/02/18100
812/09/18-10100100
912/16/18100100
1012/23/18100100
1112/30/18100
1201/06/19100
1301/13/19100
1401/20/19100
1501/27/19100

<tbody>
</tbody>

</m2),($k$2>
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Tetra201

MrExcel MVP
Joined
Oct 14, 2016
Messages
3,631
The following array formula (to be entered using Ctrl+Shift+Enter, not just Enter) returns the expected results for the posted dataset:

=SUMPRODUCT($E$3:$E$25*($C$3:$C$25>=$L2)*($C$3:$C$25<=$M2),IFERROR($K2/($K$2*($C$3:$C$25>=$L$2)*($C$3:$C$25<=$M$2)+$K$3*($C$3:$C$25>=$L$3)*($C$3:$C$25<=$M$3)),0))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,232
Messages
5,594,956
Members
413,954
Latest member
mrsandy

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
Top