there is a nested IF Statement i apply in excel, and i want to know how I do it in SAS Programming, i am sure it is doable, i am just not sure how to do it. ex: i have a table containing the below data ID Color 123 Blue 123 Yellow 123 Green 345 Pink 345 Red 345 Blue 345 White the result i want is: ID Color 123 Blue, Yellow, Green 123 Blue, Yellow, Green 123 Blue, Yellow, Green 345 Pink, Red, Blue, White 345 Pink, Red, Blue, White 345 Pink, Red, Blue, White 345 Pink, Red, Blue, White the IF Statements i use for the first option (where there is 3 duplicated ID number, for the 9th row) is: =IF((A9=A8)*AND(A9=A7),G7&"," G8&","&G9,(IF((A9=A8)*AND(A9=A10),G8&"," &G9&","G10,(IF((A9=A10)*AND(A9=A11),G9&G10&G11)))) the IF Statements i use for the second option (where there is 4 duplicated ID number, for the 16th row) is: =IF((A16=A15)*AND(A16=A14)*AND(A13=A16),G13&","&G14&","&G15&","&G16,(IF((A16=A14)*AND(A16=A15)*AND(A16=A17),G14&","&G15&","&G16&","&G17,(IF((A16=A15)*AND(A16=A17)*AND(A16=A18),G15&","&G16&","&G17&","&G18,(IF((A16=A17)*AND(A16=A18)*AND(A16=A19),G16&","&G17&","&G18&","&G19))))))) how do i get the same result using SAS Programming?
... View more