I'm trying to extract Twitter handles from tweets because my data provider unfortunately doesn't separate out retweets and @mentions. I should be able to do this using the tweets themselves since all the information is contained in the text, but I'm having difficulties getting the formula correctly.
My table is set up with the following columns:
| Link to Twitter account | Tweet text |
I want to do the following:
- Move the unique part of [link to Twitter account] to a new column called [source]
- If [tweet text] contains a word starting with "RT @", move that word into a new column called [retweet].
- If [tweet text] contains a word starting with just "@, even if it also contains a word starting with RT @", move that word into a new column called [mentions].
So for the following table:
I'd get:
I've tried numerous variations of IF/ELSEIF combinations but can't seem to get anything that works. Any ideas?