I have a table with a column name Type which contain several colors like
Red, Green, Blue, White, Black etc.
Another column has variable var1,….var10 and for each color group I want to label the variable accordingly.
Type Variable
RED Var1
RED Var2
RED Var3
RED Var4
RED Var5
Green Var1
Green Var2
Green Var3
Green Var4
Green Var5
Blue Var1
Blue Var2
Blue Var3
Blue Var4
Blue Var5
I want to label Variables according to the type of color :
RED RedColor1
RED RedColor2
RED RedColor3
RED RedColor4
RED RedColor 5
Green GreenColor1
Green GreenColor 2
Green GreenColor3
Green GreenColor4
Green GreenColor5
Blue BlueColor1
Blue BlueColor 2
Blue BlueColor 3
Blue BlueColor 4
Blue BlueColor5
I need to write something like:
If Type=”Red” then do;
label Var1=”RedColor1”
Var2=”RedColor2”
End;
But that is not working;
Any suggestions?
Thanks,
Blyssz
Red, Green, Blue, White, Black etc.
Another column has variable var1,….var10 and for each color group I want to label the variable accordingly.
Type Variable
RED Var1
RED Var2
RED Var3
RED Var4
RED Var5
Green Var1
Green Var2
Green Var3
Green Var4
Green Var5
Blue Var1
Blue Var2
Blue Var3
Blue Var4
Blue Var5
I want to label Variables according to the type of color :
RED RedColor1
RED RedColor2
RED RedColor3
RED RedColor4
RED RedColor 5
Green GreenColor1
Green GreenColor 2
Green GreenColor3
Green GreenColor4
Green GreenColor5
Blue BlueColor1
Blue BlueColor 2
Blue BlueColor 3
Blue BlueColor 4
Blue BlueColor5
I need to write something like:
If Type=”Red” then do;
label Var1=”RedColor1”
Var2=”RedColor2”
End;
But that is not working;
Any suggestions?
Thanks,
Blyssz