Hi, in this case, you can count the number of repetitive name and assign the serial number adjacent to the name and then transpose it. I have followed the same procedure. i hope this helps you. name val1 val2 val3 val4 Income 819772 819772 819772 819772 Interestrate 383884 383884 383884 383884 BANK 422388 422388 422388 422388 Børnefamilieydelse 13500 13500 13500 13500 Pensionsindtægter 0 0 0 0 Housing 317914 303766 300673 297636 Interestrate 75800 75800 75800 75800 Husleje 52800 52800 52800 52800 Interestrate 4800 4800 4800 4800 El 5600 5600 5600 5600 Kabel TV 10800 10800 10800 10800 dataset have is above; proc sort data=have; by name; run; data have_; set have; retain count; by name; if first.name then count=1; else count+1; if count > 1 then new_name=cats(name,count); else new_name=name; run; proc transpose data=have_ out=want name=var1; id new_name; var val1; run; proc print; run; Good Luck. Thanks, Jagadish
... View more