Afternoon all,
I have a dataset with a variable called list_name.
Some of these list names are prefixed with ‘Y_’ (eg: HNEWCARD vs: Y_HNEWCARD)
For the purposes of my analysis I want to treat this as the same variable.
So in short, i want to delete the first two characters of the variable name if they start ‘Y_’.
I’ve played around with some trims and substr but can’t get any valid output!
Sounds simple, but its gone over my head today!
Cheers
if substr(list_name,1,2)=’Y_’ then list_name=substr(list_name,3);