Hello everyone,
I am dealing with cleaning a string variable. I want to identify those company names which have only one unique code and tag those companies which have multiple codes. For example, for campany "blackrock "which its code is BZW, fill 1 in all cells and for company "fidelity" fill 2. I would appreciate it if you could help me with this problem.
clear
input str69 Cleanname2 str4 mgmt_cd float Year_Control
"blackrock" "BZW" 2001
"blackrock" "BZW" 2001
"blackrock" "BZW" 2001
"fidelity" "FDI" .
"fidelity" "FDI" 2001
"fidelity" "FRS" .
"fidelity" "FDI" .
Thanks.
I am dealing with cleaning a string variable. I want to identify those company names which have only one unique code and tag those companies which have multiple codes. For example, for campany "blackrock "which its code is BZW, fill 1 in all cells and for company "fidelity" fill 2. I would appreciate it if you could help me with this problem.
clear
input str69 Cleanname2 str4 mgmt_cd float Year_Control
"blackrock" "BZW" 2001
"blackrock" "BZW" 2001
"blackrock" "BZW" 2001
"fidelity" "FDI" .
"fidelity" "FDI" 2001
"fidelity" "FRS" .
"fidelity" "FDI" .
Thanks.
Comment