I have a variable Value, which is the value of some assets. The data is imported from excel and is in string format. For some values, there is a * at the end, I wonder how I can remove this * while preserving 2 decimal places for each value. I tried substr, but the length of the string is different in different cases, so that doesn't work.
Here are some example data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str17 Value "82,291.39*" "39570.6" "24074.64" "15,845.35*" "15,774.22*" "11,649.53*" "11246.64" "11,028.59*" "11000" "9915.68" "8518.709999999999" "7997.74" "7896" "7,734.59*" "7650" "7637.72" "7255.6" "6,681.68*" "6218.47" "6,199.11*" "6064.65" "6060" end
0 Response to remove * from string
Post a Comment