Hi ronjonp. Thanks for your efforts.Just curious but why are you doing this?
The example drawing and the code provided do not have any valid selections? - Yes in this case, do not have mtext but in next few drawings
Are you trying to group the closest # text with the nearest M### text? - No
I want only closest one and it should be on left side of string.
Quick example of grouping by distance: -Thaks for this