Forum Discussion
VBA Copying data in a cell to another
LIN**BP*6ZS52WA6AA~
SN1**2*EA*6~
So in this example the data that is in between the BP* ~ will be pasted in a separate cell. So the end result in the empty cell would be
6ZS52WA6AA
Similar to the data in between SN1** * * ~
The end result would be one cell would have 2 the next cell EA and the last cell 6.
14 Replies
Why should 2 be returned from the second example, but not BP from the first example?
- PostHillCopper Contributor
The reason is because I do not want to include the BP in a separate cell. I am looking to put the data
that comes after the BP* and before the end of the ~ in a cell of its own. So the example would be that the script would locate the data between the BP* and the ~ then put it in a blank cell on the sheet. Looking to accomplish the same with the line SN1**2*EA*6~. So in that example anything in between the SN1** and * would go into another cell so this example it would be the 2. Then have the EA go into another blank cell and then the 6 would go into a final cell.
What is the "rule" behind this? How can we know that you do not want to return BP but you do want to return 2? Both are between ** and *.