Sumproduct

charli chali

New Member
Joined
Mar 14, 2021
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
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?

1615724193804.png
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT(0+ISTEXT(FILTERXML("<k><m>"&TEXTJOIN("</m><m>",,B6:B22&C6:C22)&"</m></k>","//m[not(preceding::*=.) and contains(.,'"&UNICHAR(10003)&"')]")))
 
Upvote 0
You could also use
Excel Formula:
=SUM(IF(ISTEXT(B6:B22)*ISTEXT(C6:C22),1/COUNTIFS(B6:B22,B6:B22,C6:C22,UNICHAR(10003)),""))
This will need to be confirmed with Ctrl Shift Enter, rather than just Enter
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT(0+ISTEXT(FILTERXML("<k><m>"&TEXTJOIN("</m><m>",,B6:B22&C6:C22)&"</m></k>","//m[not(preceding::*=.) and contains(.,'"&UNICHAR(10003)&"')]")))
Hi and thanks alot for your kind response. This one returns answer as = 0. See the screenshot below.

1615738731177.png
 

Attachments

  • 1615738679400.png
    1615738679400.png
    133.2 KB · Views: 1
Upvote 0
You could also use
Excel Formula:
=SUM(IF(ISTEXT(B6:B22)*ISTEXT(C6:C22),1/COUNTIFS(B6:B22,B6:B22,C6:C22,UNICHAR(10003)),""))
This will need to be confirmed with Ctrl Shift Enter, rather than just Enter
This is very PERFECT. Thank you very much.
1615739380035.png
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,093
Members
448,944
Latest member
SarahSomethingExcel100

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