Please try data want; set have; if prxmatch('m/b.s\b|bachelor\b/oi',Biography)>0 and prxmatch('m/finance|economic|account|admin/oi',Biography)>0 then UnderGrad=1; else if prxmatch('m/b.s\b|bachelor\b/oi',Biography)>0 and prxmatch('m/finance|economic|account|admin/oi',Biography)=0 then UnderGrad=2; else UnderGrad=3; if prxmatch('m/m.b.a\b|master\b/oi',Biography)>0 and prxmatch('m/finance|economic|account|admin/oi',Biography)>0 then Grad=1; else if prxmatch('m/m.b.a\b|master\b/oi',Biography)>0 and prxmatch('m/finance|economic|account|admin/oi',Biography)=0 then Grad=2; else Grad=3; if prxmatch('m/cpa\b|accounting\b|accountant\b/oi',Biography)>0 then cpa=1; else cpa=0; run; Thanks, jagadish
... View more