SUMPRODUCT, with text

vytsak

New Member
Joined
Feb 4, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

i have function that counts based on week, year and another criteria.
=SUMPRODUCT(--(WEEKNUM(Table1[Date]+0,21)=[@Week]),--(YEAR(Table1[Date]+0)=[@Year]),--ISNUMBER(SEARCH("BBB",Table1[Items]))).

Is it possible to have this formula ignore rows that has text in column A, between the dates?
The formula currently returns #VALUE!.
Book1.xlsx
ABC
1ItemDate
2BBB25.01.2021
3BBB28.01.2021
4BBB07.02.2021
5AAA08.02.2021
6BBBNA
7BBB10.02.2021
8
9
10
11
12YearWeekMeas. Supports
13202101#VALUE!
14202102#VALUE!
15202103#VALUE!
16202104#VALUE!
17202105#VALUE!
18202106#VALUE!
19202107#VALUE!
Sheet1
Cell Formulas
RangeFormula
C13C13=SUMPRODUCT(--(WEEKNUM(Table2[Date]+0,21)=[@Week]),--(YEAR(Table2[Date]+0)=[@Year]),--ISNUMBER(SEARCH("BBB",Table2[Item])))
C14:C19C14=SUMPRODUCT(--(WEEKNUM($B$2:$B$7+0,21)=[@Week]),--(YEAR($B$2:$B$7+0)=[@Year]),--ISNUMBER(SEARCH("BBB",A2:A7)))
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this:
ExampleWorkbook.xlsx
ABCD
1ItemDate
2BBB44221
3BBB44224
4BBB44234
5AAA44235
6BBBNA
7BBB44237
8
9
10
11
12YearWeekMeas. Supports
13202110
14202120
15202130
16202142
17202151
18202161
19202170
20
Sheet1
Cell Formulas
RangeFormula
C13:C19C13=SUMPRODUCT(--(WEEKNUM(IF(ISNUMBER(Table2[Date]),Table2[Date],0)+0,21)=[@Week]),--(YEAR(IF(ISNUMBER(Table2[Date]),Table2[Date])+0)=[@Year]),--ISNUMBER(SEARCH("BBB",Table2[Item])),--ISNUMBER(Table2[Date]))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hey,

I have this fantastic sumproduct formula that works very well.
=SUMPRODUCT(0+ISTEXT(FILTERXML("<a><b>"&SUBSTITUTE(TEXTJOIN(",",1,$B6:$B10,$B$12:$B$16,$B$18:$B$22),",","</b><b>")&"</b></a>","//b[not(preceding::*=.)]")))

However, I would like to add condition, that count only if the status in column c "tick" meaning yes. If not, don't count.

How do I do that?

sumproduct.xlsx
ABCD
2List of Projects
3Description of IndicatorsStatus YR1 (Oct 2017 -Sept 2018)Total YR1 (Oct 2017 -Sept 2018)
4Beans15
5List of Seed companies (Seed multiplier/Distributor)4
61Seed Company_11
72Seed Company_21
83Seed Company_30
94Seed Company_41
105Seed Company_51
11List of Public Breeders (NARs, IARCs, and Universities)4
121.Public Breeder (NARs IARCs and Universities)__11
132.Public Breeder (NARs IARCs and Universities)__21
143.Public Breeder (NARs IARCs and Universities)__30
154.Public Breeder (NARs IARCs and Universities)__41
165.Public Breeder (NARs IARCs and Universities)__51
17List of Others Institutions (e.g. NGOs)4
181.Others Institutions e.g. NGOs__11
192.Others Institutions e.g. NGOs__21
203.Others Institutions e.g. NGOs__30
214.Others Institutions e.g. NGOs__41
225.Others Institutions e.g. NGOs__51
23Irish Potato
24List of Seed companies (Seed multiplier/Distributor)4
251Seed Company_11
262Seed Company_21
273Seed Company_30
284Seed Company_41
295Seed Company_51
30List of Public Breeders (NARs, IARCs, and Universities)4
311.Public Breeder (NARs IARCs and Universities)__11
322.Public Breeder (NARs IARCs and Universities)__21
333.Public Breeder (NARs IARCs and Universities)__30
344.Public Breeder (NARs IARCs and Universities)__41
355.Public Breeder (NARs IARCs and Universities)__51
36List of Others Institutions (e.g. NGOs)4
371.Others Institutions e.g. NGOs__11
382.Others Institutions e.g. NGOs__21
393.Others Institutions e.g. NGOs__30
404.Others Institutions e.g. NGOs__41
415.Others Institutions e.g. NGOs__51
42Sorghum
43List of Seed companies (Seed multiplier/Distributor)4
441Seed Company_11
452Seed Company_21
463Seed Company_30
474Seed Company_41
485Seed Company_51
49List of Public Breeders (NARs, IARCs, and Universities)4
501.Public Breeder (NARs IARCs and Universities)__11
512.Public Breeder (NARs IARCs and Universities)__21
523.Public Breeder (NARs IARCs and Universities)__30
534.Public Breeder (NARs IARCs and Universities)__41
545.Public Breeder (NARs IARCs and Universities)__51
55List of Others Institutions (e.g. NGOs)4
561.Others Institutions e.g. NGOs__11
572.Others Institutions e.g. NGOs__21
583.Others Institutions e.g. NGOs__30
594.Others Institutions e.g. NGOs__41
605.Others Institutions e.g. NGOs__51
61Irish Potato7
62List of Seed companies (Seed multiplier/Distributor)4
631Seed Company_11
642Seed Company_21
653Seed Company_30
664Seed Company_41
675Seed Company_51
68List of Public Breeders (NARs, IARCs, and Universities)4
691.Public Breeder (NARs IARCs and Universities)__11
702.Public Breeder (NARs IARCs and Universities)__21
713.Public Breeder (NARs IARCs and Universities)__30
724.Public Breeder (NARs IARCs and Universities)__41
735.Public Breeder (NARs IARCs and Universities)__51
74List of Others Institutions (e.g. NGOs)4
751.Others Institutions e.g. NGOs__11
762.Others Institutions e.g. NGOs__21
773.Others Institutions e.g. NGOs__30
784.Others Institutions e.g. NGOs__41
795.Others Institutions e.g. NGOs__51
Sheet1
Cell Formulas
RangeFormula
C78:C79,C75:C76,C72:C73,C69:C70,C66:C67,C63:C64,C59:C60,C56:C57,C53:C54,C50:C51,C47:C48,C44:C45,C40:C41,C37:C38,C34:C35,C31:C32,C28:C29,C25:C26,C21:C22,C18:C19,C15:C16,C12:C13,C9:C10,C6:C7C6=UNICHAR(10003)
D4D4=SUMPRODUCT(0+ISTEXT(FILTERXML("<a><b>"&SUBSTITUTE(TEXTJOIN(",",1,$B6:$B10,$B$12:$B$16,$B$18:$B$22),",","</b><b>")&"</b></a>","//b[not(preceding::*=.)]")))
D5,D74,D68,D61:D62,D55,D49,D43,D36,D30,D24,D17,D11D5=SUM(D6:D10)
D75:D79,D69:D73,D63:D67,D56:D60,D50:D54,D44:D48,D37:D41,D31:D35,D25:D29,D18:D22,D12:D16,D6:D10D6=(COUNTIF(C6,UNICHAR(10003)))
 
Upvote 0
Welcome to MrExcel Message Board.
Please Start New Thread. Never don't ask your question at the threads with started with other members. this is rule &
Because new threads until don't have answers has very more visitors & your Problem more quicker can solve.
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

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