Re: VBA locate text string, cut and paste
Batman,
Thanks for the reply. Your solution would solve for what I posted, but as is normal in my case I dodn't explain clearly enough.
The string of criteria to search for could be as many as 100 different variations, and any one of these strings may exist in the original string that needs to be queried. Probably what would work best would be for me to have a column of criteria to search for in a second tab, have the code loop through this list and search for each string in the first tab that contains the 30,000 rows. When it finds the string, cut and paste to a column four to the right of the column in which it found the string (in the first tab).
So tab "A" has 30,000 rows with a column containing strings of 20 to 30 characters. tab "B" has a colum of 100 rows containing the text string to search for. The code would look at the first cell in tab "B", loop though all 30,000 rows in tab "A" , extract the string if it finds it, cut it from the cell and past it four columns to the right. Then it looks for the criteria string listed in the next cell down of tab "B", etc,etc.
Thanks again