TEXTJOIN with exact match

nburaq

Board Regular
Joined
Apr 2, 2021
Messages
220
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,
I would like find the values based on exact match via textjoin function but it gives results even with partial matches. What is the correct formula for that or can you fix mine? Thanks for your help.

LocationValue
ABC
101​
ABC-00A
105​
ABC-00B
106​
ABC-00B-01
110​

I use formula similar to :
=TEXTJOIN(",",TRUE,IF($A$2:$A$5=E2,$B$2:$B$5,""))

If I try only to find value of "ABC" then it brings all the values starting with ABC. Hence instead of showing only value 101 it shows 101,105,106,110
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
In that case your formula works for me
Fluff.xlsm
ABCDE
1LocationValue
2ABC101ABC
3ABC-00A105101
4ABC-00B106
5ABC-00B-01
Main
Cell Formulas
RangeFormula
E3E3=TEXTJOIN(",",TRUE,IF($A$2:$A$5=E2,$B$2:$B$5,""))
 
Upvote 1
Solution
In that case your formula works for me
Fluff.xlsm
ABCDE
1LocationValue
2ABC101ABC
3ABC-00A105101
4ABC-00B106
5ABC-00B-01
Main
Cell Formulas
RangeFormula
E3E3=TEXTJOIN(",",TRUE,IF($A$2:$A$5=E2,$B$2:$B$5,""))
Ok, then something might be wrong with the table I pull from the database. Thanks for the confirmation I thought my formula is not working even I was trying to build something TEXTJOIN(ISNUMBER(SEARCH...
 
Upvote 0
Is this what you mean?

23 02 21.xlsm
ABCDE
1LocationValue
2ABCD101ABC
3ABC-00A105Not Covered
4ABC-00B106
5ABC-00B-01111
TJ
Cell Formulas
RangeFormula
E3E3=LET(tj,TEXTJOIN(",",TRUE,IF($A$2:$A$5=E2,$B$2:$B$5,"")),IF(tj="","Not Covered",tj))
 
Upvote 0
.. or perhaps this instead?

23 02 21.xlsm
ABCDE
1LocationValue
2ABCD101ABC
3ABC-00A105Not Covered
4ABC-00B106
5ABC-00B-01111
TJ
Cell Formulas
RangeFormula
E3E3=TEXTJOIN(",",1,FILTER(B2:B5,A2:A5=E2,"Not Covered"))
 
Upvote 0
.. or perhaps this instead?

23 02 21.xlsm
ABCDE
1LocationValue
2ABCD101ABC
3ABC-00A105Not Covered
4ABC-00B106
5ABC-00B-01111
TJ
Cell Formulas
RangeFormula
E3E3=TEXTJOIN(",",1,FILTER(B2:B5,A2:A5=E2,"Not Covered"))
I tried that but then it is giving "CALC! error
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

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