Hey all, I am trying to take a row of data that I've pulled from excel, and assign each value to a separate variable. I used to have a Regex formula to accomplish this, but I recently had to reinstall my computers OS and lost a bunch of data due to a backup corruption.
Here is the data:
PEA001 New York, NY BC AT&T Spectrum Frontiers LLC 2 $515,167,123 $1,030,334,246 40
And I'm trying to get it to result in this:
Var 1: PEA001
Var 2: New York, NY
Var 3: BC
etc....
The SPLIT plugin is what you needed.
BTW, @ComplexPoint, I think it'll be good if you could add this sample macro link to the plugins post. so that users may easily find the sample post from the Plugin posts.
Unfortunately that isn't gonna do it for me because I need to be able to access each word as a separate variable. I remember @peternlewis posted in a thread a great regex that split up each word into a separate variable using regex and the search and replace tool
Yes. You can get use some simple actions to achieve your goal, but I thought the plugins are neat. So I thought it might be good to introduce that for you.
Here is an example to use a simple Regex Search and Replace, to replace the Tab with a unique string that you can use as a delimiter to get each items. Here I set it as ~~delimiter~~. You can use any string that will not appear in your data.
Well, you have to first define and tell us how each "word" is separated.
The example you gave of "New York, NY" clearly contains multiple "words" as commonly defined, and as defined by normal RegEx rules.
Once we know the delimited between fields (what you are calling words) it is fairly easy.
If you get this by a copy from cells in the same row in Excel, then the fields will be separated by TABs.
Here is a simple solution using TABs. It is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
Ah. That's a simpler way. I should have came up with this solution from the beginning. But I was passionate about sharing a plugin and was myself brought away with a plugin-like solution...