Hey everyone,
I have a set of data with trades made. The description column has:
1) name of the stock traded
2) the transaction code in brackets
3) The words explaining the transaction code
4) Useless words at the end of the important stuff.
There are four types of transactions I care about and here is the correct format:
ABC PIPE Ltd. (SEL) Sell
ABC HUNGRY LTD (XSL) Cancel Sell
ABC SR2 5OCT17 (BUY) Buy
ABC SR2 5OCT17 (XBY) Cancel Buy
However there are a lot of values that have additional information that was brought in (via pdf) such as below:
ABC CORP (SEL) Sell Closing Cash Balanc
ABC EFF 5 31JAN19 (BUY) Buy Closing C
ABC CORP (SEL) Sell Page 4 of 6 Dac
Question:
1) Is there a way to remove characters after a key phrase (bolded above)? Ex. find "(SEL) Sell" or find "(BUY) Buy" then remove everything after?
I know that I could combine a "midstring" function and "Find" for ")" but there are different amounts of characters afterwards. Not sure how to do for multiple different strings.
Thank you very much!
Solved! Go to Solution.
Thank you! The only part missing is the calculation for the "Cancel Sell" or "Cancel Buy", and someone did it below. Thanks again I appreciate your time
Thanks so much Tom! Much appreciated for your time!