Sum for textsplit textjoin selections from one cell

ShanaStJ

New Member
Joined
Feb 16, 2024
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Need assistance with this formula. I have entered a code that is successfully working allowing multiselections for a drop down menu in one column. What I need and what is not working is the formula to total those selections individually. Below is an example and the formula I have entered that is returning a value of 0 even though there are entries. You will notice that even though there are multiple selections in the top part, they are not calulating ih the bottom. Any help greatly appreciated.

=SUM(--(TRIM(TEXTSPLIT(TEXTJOIN(",",,$U$36:$U$75),","))=U77))

1713465664567.png
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
what is between U35 and U65?

why don't you post the file to a share drive?
 
Upvote 0
what is between U35 and U65?

why don't you post the file to a share drive?
Unfortunately, the remainder has confidential information in it and I cannot upload it to anything due to this. I was able to put this on here with modified sample data entry in an attempt to obtain a formula for the sum. The two formula's I've used are

=UNIQUE(TRIM(TEXTSPLIT(TEXTJOIN(",",,U36:U75),,","))) This one successfully works allowing me to add a list to a pull down and I have a vba code entered so someone can select multiple entries from this list and it adds them to the same cell separated out by a comma.

=SUM(--(TRIM(TEXTSPLIT(TEXTJOIN(",",,$U$36:$U$75),","))=U77)) - This formula is the one I was trying to use to count the number of times each one of those selected from the pull down list that is in the U column.
 
Upvote 0
what is the specific error message you get with that formula.
And I'll ask again...and make up data if you can. Please post something (text if text, numbers if number) in U36:U75. and what an expected result should be. But it appears U77 has a value of zero. So, you'll only get matches when the value is zero.
 
Upvote 0
what is the specific error message you get with that formula.
And I'll ask again...and make up data if you can. Please post something (text if text, numbers if number) in U36:U75. and what an expected result should be. But it appears U77 has a value of zero. So, you'll only get matches when the value is zero.
That's just it, while I'm expecting a count of how many times that item is entered it returns zero but it does not give me an error at all.
 
Upvote 0
Try:
SplitNameEmail.xlsx
UVW
66Substance usage
67Ran out of meds, Did not follow up with after care, Count not afford meds, Did not have transportation for aftercare
68Did not have an appt for aftercare, Substance usage, Unstabble housing
69Unstable housing, Refused to go to after care
70Lack of support system, Lack of finances, Lack of finances
71
72
73
74
75ArrayDragdown
76Did not follow up with aftercare00
77Ran out of meds11
78Count not afford meds11
79Did not have transportation for aftercare11
80Did not have an appt for aftercare11
81Substance usage22
82Unstable housing11
83Refused to go to after care11
84Lack of support system11
85Lack of finances22
Sheet6
Cell Formulas
RangeFormula
V76:V85V76=LET( t,TOCOL(TRIM(TEXTSPLIT(TEXTJOIN(",",TRUE,U66:U70),","))), br, BYROW(U76:U85,LAMBDA(r,ROWS(FILTER(t,t=r)))), IFERROR(br,0))
W76:W85W76=LET( t,TOCOL(TRIM(TEXTSPLIT(TEXTJOIN(",",TRUE,$U$66:$U$70),","))), IFERROR(ROWS(FILTER(t,t=U76)),0))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,308
Messages
6,124,178
Members
449,146
Latest member
el_gazar

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