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>
 

Tetra201

MrExcel MVP
Joined
Oct 14, 2016
Messages
3,471
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))
 

Forum statistics

Threads
1,082,132
Messages
5,363,339
Members
400,726
Latest member
Shahzad Taimoor

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top