I got an awkward data selection problem. data have; input x y1-y5; datalines; 816016.2 751112,abcklop 816015,wxyp 816016,klmno 140692.5 140672,aopk 140638,bfgrt 140682,uvgt 140652,kjnh 140692,kjnh 854222.3 854442,bnghy 854222,hhgi 821004,klop 821202,bmnh 216004.2 216004,klopi 250200,brtn 772551,jklop 853332.3 874089,kjlnm 816015,qwert 816014,mnbp 853332,ubny 740210,mnbp 161002.2 716022,gmbhj 161002,dmdn 810202,yupoi 816000,klhnp 450212.3 854001,mjkopl 441406,jkoprt 450212,kmplo 751101,weqrt 816018,kjmioot 858122.2 858112,brdt 857601,olpyt 857501,kmopyth 857401,mnkop 858122,rmnhg ; First six numbers in the row in column x matche with one of the first six numbers in the same row of column y1 through y5. But column y1 to y5 has both numbers and characters mixed, however the first six are always the numbers. I needed to select the one value (both the six numbers and attached characters) from y1 to y5 that matches the six numbers in column x and drop the rest of the unwanted values. For example, Data want; 816016.2 816016,klmno 140692.5 140692,kjnh 854222.3 854222,hhgi 216004.2 216004,klopi 853332.3 853332,ubny 161002.2 161002,dmdn 450212.3 450212,kmplo 858122.2 858122,rmnhg I would appreciate very much if some expert in the community can help me to get the result. Thank you all, SkSap
... View more