data have; input (id Name Gender Date) (:$10.); cards; 1 Dan M 1/1/2012 1 Dan M 12/23/2011 1 Dan M 10/15/2011 1 Dan M 9/17/2011 2 Carol F 8/12/2011 2 Carol F 7/15/2011 ; run; data want; set have; by id; name=ifc(first.id,name,' '); gender=ifc(first.id,gender,' '); run; proc freq data = want; tables id*name*gender / list missing norow nocol nopercent nocum out=temp; run; libname test 'c:\temp\test.xls'; proc sql; drop table test.sheet1; quit; data test.sheet1; set temp; run; libname test clear;
... View more