Does efficiency really matter? You only need to transform the data once. Anyway here's one way (assuming your data is sorted by ID): proc transpose data=have prefix=start out=start_dates; by id; var start; run; proc transpose data=have prefix=end out=end_dates; by id; var end; run; data want; merge start_dates end_dates; by id; run; You will find that some programming tasks are easier, but they now depend on you knowing how many start and end dates you have. Good luck.
... View more