Sumproduct, Index for second (or third) row

mrsmcm

New Member
Joined
Jul 12, 2017
Messages
14
Good afternoon, I was hoping you all could assist with the following problem. I have tried to outline the situation below. "Sheet 1" is the table of data. "Sheet 2" is where I would like to sum the second row of each set. Currently, I am able to sum the first row no problem using sumproduct and index. Is there another solution to sum the second row instead? Please let me know if I can provide additional information. TIA.

"Sheet 1"

A1B1C1D1
A102030
555
111
B555
111
101010
C111
101010
555

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

"Sheet 2"
A =SUMPRODUCT((Sheet1!A2:A12=Sheet2!A2)*INDEX(Sheet1!B2:D12,0,1):INDEX(Sheet1!B2:D12,1,0))
A = 60

Want A to = 15
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try

Sheet2

A
B
C
1
Criteria​
Row​
Result​
2
A​
2​
15​
3
B​
2​
3​
4
C​
2​
30​

Formula in C2 copied down
=SUM(INDEX(Sheet1!B$2:D$12,MATCH(A2,Sheet1!A$2:A$12,0)+B2-1,0))

Hope this helps

M.
 
Upvote 0
The formula works on my simplified version, but not on the more complex actual workbook. It's actually returning a number, but I can't figure out where that number is coming from. Any other suggestions would be much appreciated. I greatly appreciate your help.
 
Last edited:
Upvote 0
I just realized I have a part two. What if the B1, C1, D1 -> Z1 were dates, specifically quarter end dates, i.e. 3/31/17; 6/30/17; 9/30/17; 12/31/17; etc. How could I tell the formula to stop at 9/30/2017, or some other date of my choosing? This would be a criteria on Sheet 2 - A1 - A; B1 - 9/30/17

Any thoughts? TIA
 
Upvote 0
Hopefully this makes sense...I would like the formula to stop at a specified date. The formula I'm currently using is below and sums the second row in each table. I can not change the output of this information.

Any help is greatly appreciated.

"Sheet 1"
ABCDE
1Type3/31/20176/30/20179/30/2017 12/31/2017
2A10203040
35555
41111
5
6B5555
71111
810101010
9
10C1111
1110101010
125555

<tbody>
</tbody>

"Sheet 2"

ABCD
1TypeDateCurrently (see below formulaWould like to see
2A6/30/20172010
3B9/30/201743
4C3/31/20174010

<tbody>
</tbody>

Current formula (to sum second row of data) =SUM(INDEX(Sheet1!$B$3:$E$13,MATCH(Sheet2!A3,Sheet1!$A$3:$A$13,0)+2-1,0))
 
Last edited:
Upvote 0
Try


A
B
C
D
1
Type​
Date​
Row​
Formula​
2
A​
06/30/2017​
2​
10​
3
B​
09/30/2017​
2​
3​
4
C​
03/31/2017​
2​
10​

Formula in D2 copied down
=SUM(INDEX(Sheet1!B$2:E$12,MATCH(A2,Sheet1!A$2:A$12,0)+C2-1,1):INDEX(Sheet1!B$2:E$12,MATCH(A2,Sheet1!A$2:A$12,0)+C2-1,MATCH(B2,Sheet1!B$1:E$1,0)))

M.
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,270
Members
449,093
Latest member
Vincent Khandagale

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