TEXTJOIN Alternative

mightymo77

New Member
Joined
Dec 16, 2021
Messages
17
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
Hey guys. I was reading through some posts and everyone here seems very helpful. I have this formula below, however it's not working on my work machine which uses Excel 2016. Can anyone create an alternative for me that will function in Excel 2016? I would appreciate any help!

=TEXTJOIN(", ",TRUE,IF(ISNUMBER(FIND($F2:$T2,"BLACK,BLUE")),$F$1:$T$1,""))
 
That's a limit of Excel. See here:


If you have a string longer than that, you'll have to break it up into pieces.

Any recommended suggestions on how best to break this into pieces?

Example of what I'm trying to accomplish is:
1640096144985.png


Populating this Product Group (PG) column with all the different product groups our vendors supply us with. The data is in here:

1640096476383.png

A data export listing all vendors and the articles they supply us with, along with the PG of that article. What I'm needing to do is take that and extract just the unique PGs for each vendor. The data length is searching tends to be 25000-40000 rows of data.

The current code I use is
Excel Formula:
=TEXTJOIN(", ",TRUE,IF(PGbyVendor!$E$1:$E$259=Vendors!D5,PGbyVendor!$J$1:$J$259,""))

Which does the job but it stops working if I extend either past 259 ?

Is there a way to make this work? Or an alternative method?
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Frankly, I don't think that putting so much data in a single cell is a good idea. A person looking at it wouldn't be able to find anything in a reasonable way, and any automated method would have to parse it out before it could find anything. If you're trying to export a list of PGs for a vendor, I'd just filter your sheet, then just export the visible rows.
 
Upvote 0
There's a lot of data to search thru but if it's only returning uniques it will only return maybe 2-3 PGs at most for each Vendor.

For example:
1640181566620.png


But I just need it to search a larger area o_O
 
Upvote 0
I can't explain why it stops at 259 for you. Here's an example where I go to 1000. Maybe you can try the F2 formula, using FILTER instead of IF.

Cell Formulas
RangeFormula
F1F1=TEXTJOIN(", ",TRUE,IF(A1:A1000=E1,B1:B1000,""))
F2F2=TEXTJOIN(", ",,FILTER(B1:B1000,A1:A1000=E1))
 
Upvote 0
Because that doesn't always work.
An example would have been helpful.
So far I just have examples of my function being superior to Excel's TEXTJOIN (also something I normally try to avoid because of compatibility reasons):
 
Upvote 0
An example would have been helpful.
So far I just have examples of my function being superior to Excel's TEXTJOIN (also something I normally try to avoid because of compatibility reasons):

Here is a test I made for testing different versions of TextJoin Altenatives. Try it out and see how your version does. Let us know.

TextJoinAlternative.xlsm
ABCDEF
1#VALUE!
2
3Check True with Blank CellIn the middle 
4Check False with In the middle 
5
6A6B6 
7A7B7
8
9JaneErinGordonMs. 
10
1112/9/202112/16/2021#VALUE!
12
13New York CityNY10101US#VALUE!
14end
15,,,;
16
17John2Team 1 
18Jim1Team 2 
19Bob1
20Bill2
21
22JimPensBob 
23JimPencilsJim
24BobChalk
25JimPaper
26BobCrayons
27
28Monkey 
29
30A30B30 
31A31B31
32
33New York CityNYset cell to wrap text ---> 
34
35, TRUERedBlack 
36GreenWhite
37Blue
38
39USNew York CityNY10101#VALUE!
40
41123#VALUE!
42
Sheet13
Cell Formulas
RangeFormula
E1E1=TextJoin(" ",TRUE, "This", "is", "a", "test", "of", "TEXTJOIN.")
E3E3=TextJoin(" ",1,A3:C3)
E4E4=TextJoin(" ",0,A4:C4)
E6E6=TextJoin(", ", 1, A6:B7)
E9E9=TextJoin(" ",1,D9,A9:C9)
E11E11=TextJoin(" - ",1,TEXT(A11,"m/dd/yyyy"),TEXT(B11,"m/dd/yyyy"))
E13E13=TextJoin(A15:D15, TRUE, A13:D14)
E17E17=TextJoin(", ", TRUE, IF($B$17:$B$20=1, $A$17:$A$20, ""))
E18E18=TextJoin(", ", TRUE, IF($B$17:$B$20=2, $A$17:$A$20, ""))
E22E22=TextJoin(", ", TRUE, IF($A$22:$A$26=C22, $B$22:$B$26, ""))
E28E28=TextJoin("",1,MID(A28,{10,9,8,7,6,5,4,3,2,1},1))
E30E30=TextJoin("-- ", 1, A30:A31,B30:B31)
E33E33=TextJoin(CHAR(10), TRUE, A33:B33)
E35E35=TextJoin(A35,B35,C35:C37,D35:D37)
E39E39=TextJoin({", "}, TRUE, A39:D39)
E41E41=TextJoin(,TRUE,A41:C41)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Here is a test I made for testing different versions of TextJoin Altenatives. Try it out and see how your version does. Let us know.

...
Thanks but I am not interested in dealing with pathological cases such as parameter Delimiter being an array or parameter Ignore_empty having an integer value.
I am taking away the case Text(i) being a String and not an array, though.
 
Upvote 0
Your choice if you want to ignore problem points with the code that you submitted. You are the one who touted the code as 'superior' to Excel's TextJoin. I don't see how it can be viewed as 'superior' when it can't handle situations that Excel's TextJoin can handle. Opinions can vary though.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,941
Members
449,094
Latest member
teemeren

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