Filterxml returns Value error

sanket_sk

Board Regular
Joined
Dec 27, 2016
Messages
140
Office Version
  1. 365
Platform
  1. Windows
Hi There,

I am using the below formula to extract unique values from multiple columns to a single column.

This works great in the sheet, however, whenever there is an “&” character this formula fails and shows a “Value” error, could you please help me on this.

Book2
ABCDE
1MumbaiFormula
2PuneIndor
3IndorMumbai
4Pune
5
6MP & CGFormula
7Kerla#VALUE!
8UP
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=SORT(UNIQUE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,A1:C4)&"</s></t>","//s")))
E7E7=SORT(UNIQUE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,A6:C11)&"</s></t>","//s")))
Dynamic array formulas.


Thanks & Regards,
Sanket
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
Excel Formula:
=SORT(UNIQUE(FILTERXML("<t><s>"&SUBSTITUTE(TEXTJOIN("</s><s>",TRUE,A6:C11),"&","&amp;")&"</s></t>","//s")))
 
Upvote 0
Solution
If you happen to have the new TOCOL function (not everybody has yet) ..

22 05 19.xlsm
ABCDE
1MumbaiFormula
2PuneIndor
3IndorMumbai
4Pune
5
6MP & CGFormula
7KerlaKerla
8UPMP & CG
9UP
10
TOCOL
Cell Formulas
RangeFormula
E2:E4,E7:E9E2=SORT(UNIQUE(TOCOL(A1:C4,1)))
Dynamic array formulas.
 
Upvote 0
How about
Excel Formula:
=SORT(UNIQUE(FILTERXML("<t><s>"&SUBSTITUTE(TEXTJOIN("</s><s>",TRUE,A6:C11),"&","&amp;")&"</s></t>","//s")))
This solution worked well - Thanks for quick fix
 
Upvote 0
If you happen to have the new TOCOL function (not everybody has yet) ..

22 05 19.xlsm
ABCDE
1MumbaiFormula
2PuneIndor
3IndorMumbai
4Pune
5
6MP & CGFormula
7KerlaKerla
8UPMP & CG
9UP
10
TOCOL
Cell Formulas
RangeFormula
E2:E4,E7:E9E2=SORT(UNIQUE(TOCOL(A1:C4,1)))
Dynamic array formulas.
Hi Peter,

Thanks for the guidence however TOCOL is not available in my system, I will definitely try it once available.


Sanket
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,068
Messages
6,128,592
Members
449,460
Latest member
jgharbawi

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