How do I display x,y coordinates without displaying duplicate x,y coordinates?

arthurz11

Board Regular
Joined
Nov 9, 2007
Messages
162
Office Version
  1. 2021
Platform
  1. Windows
Picture1.png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Perhaps for the future you could investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with? ;)
You will generally get faster & better suggestions.
If you have trouble with XL2BB review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of theXL2BB Instructions page linked above.

See if this does what you want.

24 08 30.xlsm
ABCDEFGHIJKLMNOPQRSTU
1XYXYXYXYXYXYXYXYXYXY
22333231414233314
3212111123321111233
4242311312324231131
5333333333333
631134241143113424114
7121424123312142433
Unique pairs
Cell Formulas
RangeFormula
L2:Q2,L7:S7,L6:U6,L5:M5,L3:S4L2=TRANSPOSE(FILTERXML("<p><c>"&SUBSTITUTE(TEXTJOIN("</c><c>",,UNIQUE(FILTERXML("<p><c>"&TEXTJOIN({"|","</c><c>"},,A2:J2)&"</c></p>","//c"))),"|","</c><c>")&"</c></p>","//c"))
Dynamic array formulas.
 
Upvote 0
Whoa! The complexity of the formula is way too difficult for me to understand as much as me trying to explain it to someone else. Can we just simplify it by just doing one row instead of all four rows? Would you please be so kind as to just do one row where it does not display duplicate x,y coordinates. I will be greatly appreciated.
 
Upvote 0
Whoa! The complexity of the formula is way too difficult for me
It is not a simple task with your excel version (or any version for that matter)

Can we just simplify it by just doing one row instead of all four rows?
The formula is for one row. It needs to be copied down from L2 to the other cells in column L if you want the results for multiple rows.
Here it is (again) for one row.
Somebody else might have a simpler way but it was the best I could come up with by formula.
It could be done by vba as an alternative, but that has its own complexities. :cool:

24 08 30.xlsm
ABCDEFGHIJKLMNOPQRSTU
1XYXYXYXYXYXYXYXYXYXY
22333231414233314
Unique pairs
Cell Formulas
RangeFormula
L2:Q2L2=TRANSPOSE(FILTERXML("<p><c>"&SUBSTITUTE(TEXTJOIN("</c><c>",,UNIQUE(FILTERXML("<p><c>"&TEXTJOIN({"|","</c><c>"},,A2:J2)&"</c></p>","//c"))),"|","</c><c>")&"</c></p>","//c"))
Dynamic array formulas.
 
Upvote 0
I don't know if it's any better but:

Excel Formula:
=TEXTSPLIT(TEXTJOIN(",",,(UNIQUE(TEXTSPLIT(TEXTJOIN({",",";"},TRUE,A2:J2),,";")))),",")
 
Upvote 0
I don't know if it's any better but:

Excel Formula:
=TEXTSPLIT(TEXTJOIN(",",,(UNIQUE(TEXTSPLIT(TEXTJOIN({",",";"},TRUE,A2:J2),,";")))),",")
The results was #NAME?. I doubled checked the formula but I got the same. Please help.
 
Upvote 0
I don't know if it's any better but:

Excel Formula:
=TEXTSPLIT(TEXTJOIN(",",,(UNIQUE(TEXTSPLIT(TEXTJOIN({",",";"},TRUE,A2:J2),,";")))),",")

OP has 2021 which doesn't have TEXTSPLIT as far as I am aware.
 
Upvote 0
Another option, although not necessarily simpler
Excel Formula:
=LET(f,FILTER(A2:J2,A2:J2<>""),s,SEQUENCE(COLUMNS(f)/2,,0),u,UNIQUE(INDEX(f,,s*2+{1,2})),ss,SEQUENCE(COUNT(u),,0),TRANSPOSE(INDEX(u,INT(ss/2)+1,MOD(ss,2)+1)))
 
Upvote 0
Solution
Another option, although not necessarily simpler
Excel Formula:
=LET(f,FILTER(A2:J2,A2:J2<>""),s,SEQUENCE(COLUMNS(f)/2,,0),u,UNIQUE(INDEX(f,,s*2+{1,2})),ss,SEQUENCE(COUNT(u),,0),TRANSPOSE(INDEX(u,INT(ss/2)+1,MOD(ss,2)+1)))
Works great!!!!! You da Man! The Myth, and the Legend. I appreciated all your help.
 
Upvote 0

Forum statistics

Threads
1,224,111
Messages
6,176,425
Members
452,728
Latest member
mihael546

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