generating dummy from piece of string

#1
Hey guys. I'm new to Stata and would really appreciate anyone who can help me.

My data is currently in excel and many of the data points contain a numerical value followed by "(s)" indicating the standard error is greater than 40% of that value. My ultimate goal is to get this data into STATA, without the "(s)" after each observation, but instead with a dummy variable indicating where the "(s)" used to occur (ie indicating which observations have a standard error above 40%).
Please help if you can.
 

bukharin

RoboStataRaptor
#2
I would:
1. convert it to Stata using any of the various techniques for doing this
2. the variable will be imported as a string - use -destring varname, ignore("(s)") replace- to convert it to numeric
3. create the dummy variable - something like -gen byte over40=varname>40 if !missing(varname)-