Sumifs+index formula help!!

WormJacob

New Member
Joined
Jan 8, 2018
Messages
18
Hello ,

NEw to this forum and would to get help(first thank you in advanced)!!

I need help to create a formula that sum the following Summary below?
EoHOm8.png



hbfL9V.png


<colgroup><col><col><col><col><col><col><col><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Second Table starts From B14.
Months NAME in C15,E15,G15 is to be replaced by 1/1/18,1/2/18,1/3/18 (dd/mm/yy)
B16=Fruits

Formula in C17, then drag across

Code:
=SUMPRODUCT(($F$2:$M$7)*((($A$2:$A$7=$B17)*($D$2:$D$7=C$16))*(MONTH($F$1:$M$1)=MONTH(INDEX($C$15:$H$15,IF(ISODD(COLUMNS($C$15:C$15)),COLUMNS($C$15:C$15),COLUMNS($C$15:C$15)-1))))))
 
Upvote 0
Similar in concept:

ABCDEFGHIJKLM
1PartPart DescriptionLead-timeOrder Type50 wk Total12/25/20171/1/20181/8/20181/29/20182/5/20182/12/20182/26/20183/5/2018
2AppleWhole3PO20200000000
3AppleWhole3Planned7400020202040020
4BananaWhole5PO20200000000
5PearsWhole5Planned72000002040200
6PearsWhole15Planned740000202040020
7OrangeWhole15PO26602000000
8
9
10
112018
12JanFebMar
13FruitsPlannedPOPlannedPOPlannedPO
14Apple400600200
15Banana000000
16Pears2001400200
17Orange0200000

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B14=SUMPRODUCT(($F$2:$M$7)*($D$2:$D$7=B$13)*(YEAR($F$1:$M$1)=$B$11)*(TEXT($F$1:$M$1,"mmm")=INDEX($B$12:$G$12,COLUMNS($B2:B2)-MOD(COLUMN(),2)))*($A$2:$A$7=$A14))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



The layout of your tables made it a bit tricky. I assume you'd put the result table on another sheet. The year and months are probably merged cells. Put the formula in B14, drag down and across as needed.
 
Upvote 0
Thanks ERIC!! Really appreciated.!!!!! Quite honest that table are sooo tricky and this is how i received from my customer and im trying to Simplified it instead of manual modifying it each time.. Again.. Thanks for the support
 
Upvote 0
Hi Eric/Anyone?

Formula work on same sheet.. When i created Summary on NEW Sheet(refer sheet and ranges )

Here is new Formula: It came out #n/A and 0 on the rest of the column?

eDMH7l.png


This is the Summary(Summary)
ECsGjS.png


Forecast0109(data)
OfWVsT.png
 
Upvote 0
Try:

ABCDEFGH
12018
2JanFebMar
3PartPlannedPOPlannedPOPlannedPO
4Apple400600200
5Banana000000
6Pears2001400200
7Orange0200000

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Summary

Worksheet Formulas
CellFormula
C4=SUMPRODUCT((Forecast!$I$2:$P$7)*(Forecast!$G$2:$G$7=C$3)*(YEAR(Forecast!$I$1:$P$1)=$C$1)*(TEXT(Forecast!$I$1:$P$1,"mmm")=INDEX($C$2:$H$2,FLOOR(COLUMNS($C2:C2)-1,2)+1))*(Forecast!$A$2:$A$7=$A4))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



I changed the formula to use FLOOR instead of MOD, which should eliminate one type of problem when you insert columns. Other things to look for is I have my Months in C2,E2,G2, and you have them in D2,F2, and H2. Also, F2 is a date, not a month abbreviation. If you want to Merge and Center C2:D2 (and the rest of the months), then it looks better and the formula works. Also, I can adapt it to use either the 3-letter abbreviation, or the first of the month as a date if you want.

Also, consider using a tool like the HTML Maker in my signature. It makes it much easier for someone to copy your data to work with. Your screen prints are good, but many people won't spend the time to type in a large table. That's why I used the old data, but I moved it to your new ranges.
 
Upvote 0
Thank Eric.. I will try this.. I will them on HTMl maker if any thing wrongs comes up (on my side)! Thank you
 
Upvote 0
Hi Eric/Someone?

Sorry i couldn't load on HTML. 2 sheet (1tab- Summary) & (2nd FRC-Jan18 data) .. Not error but just not calculating ... All are ZERO


Summary
ACDEFGH
1 2018
2MonthsJanFebMar
3PartPlannedPOPlannedPOPlannedPO
41647670000000
52104179000000
63118228000000
73118237000000

<colgroup><col><col><col span="6"></colgroup><tbody>
</tbody>

CellFormula
C4=SUMPRODUCT(('FRC-Jan18'!$E$2:$BB$103)*('FRC-Jan18'!$C$2:$C$103=AA$3)*(YEAR('FRC-Jan18'!$E$1:$BB$1)=$C$1)*(TEXT('FRC-Jan18'!$E$1:$BB$1,"mmm")=INDEX($C$2:$Y$2,FLOOR(COLUMNS($C2:AA2)*1,2)+1))*('FRC-Jan18'!$A$2:$A$103=$A4))

<colgroup><col><col></colgroup><tbody>
</tbody>

FRC-Jan18

ABCDEFGHIJ
1PartPart DescriptionOrder Type50 wk Total1/8/20181/15/20181/22/20181/29/20182/5/20182/12/2018
23951894WholePlanned 294042084420
33951894WholePlanned 504000000
44851751WholeNo Orders0000000
53305442WholeNo Orders0000000
63305524WholePlanned 18000300
74109268WholePlanned 8000000
84142630WholePlanned 12000000
94142630WholePO 0000000
104157695WholePO 1010000
114157695WholePlanned 10000000

<colgroup><col><col span="3"><col><col><col span="3"><col><col></colgroup><tbody>
</tbody>

Thank you again in advance!
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 
Upvote 0
You missed changing one range reference, and had another typo. Try:

C4:

=SUMPRODUCT(('FRC-Jan18'!$E$2:$BB$103)*('FRC-Jan18'!$C$2:$C$103=C$3)*(YEAR('FRC-Jan18'!$E$1:$BB$1)=$C$1)*(TEXT('FRC-Jan18'!$E$1:$BB$1,"mmm")=INDEX($C$2:$Y$2,FLOOR(COLUMNS($C2:C2)-1,2)+1))*('FRC-Jan18'!$A$2:$A$103=$A4))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,598
Members
449,089
Latest member
Motoracer88

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