Combining SUMPRODUCT with INDEXMATCH

cuddy89

New Member
Joined
Nov 26, 2019
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
I would be grateful for some assistance with this formula that I am struggling to write properly.

Please see the excel table below. My aim is to rewrite the second part of the SUMPRODUCT (K5:K9) so that it looks up the relevant column based on the date in B1.
I have already achieved this with the formula in cell P2, but cant get it to work as part of the SUMPRODUCT.

So I'm looking for something like:

=SUMPRODUCT(C5:C9,column based on date in B1 matched with range D3:K3)/SUM(INDEX(D5:K9,,MATCH(B1,D3:K3)))

Thanks in advance for any suggestions.

SUMPRODUCT query.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How about
Excel Formula:
=SUMPRODUCT(C5:C9,INDEX(D5:K9,,MATCH(B1,D3:K3)))
 
Upvote 0
Ëxpample:you can use OFFSET
test.xlsm
ABCDEFGHI
1B
2ABCD
312345
423456
534567
645678
756789
8
985
Sheet3
Cell Formulas
RangeFormula
A9A9=SUMPRODUCT(A3:A7,OFFSET(C3,,MATCH(A1,C2:I2,)-1,5))
 
Upvote 0
Personally I'd stick to an index/match rather than putting a volatile function into an array formula.
 
Upvote 0
Personally I'd stick to an index/match rather than putting a volatile function into an array formula.
I have another problem. Sometimes when I use xl2bb or insert excel function in post, it doesn't display correctly. I'm sure I've used these steps correctly,
 
Upvote 0
If you are having a problem with XL2BB then please start a thread in the "About this board" section.
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,960
Latest member
AKSMITH

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
Back
Top