RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
Hi all, need fast help on this as I'm under a timescale.
I have a list of ads due to be placed in a paper and under the "Pickups" for coach travel there is meant to be a list of coach-only pickups, but air and rail have slipped in.
As an example, please see the below:
So I need to remove everything after "Ipswich", including that last comma, I need to find the first instance of "Flying" and remove everything using that as a start point, to end up with the following:
This is more or less simple enough to do with FIND etc, but the problem is that sometimes the Airport or Rail pickups are buried in the middle, like this:
Which would then need to be like this:
Can anyone help me urgently, I have to detect whether "Flying" or "(RS)" is within a set of commas (or at the end!) and then remove just those pickups including their respective commas to end up with just coach pickups (these don't have "(RS)" or "Flying from xxxx" in them)
Really appreciate it, thanks!
I have a list of ads due to be placed in a paper and under the "Pickups" for coach travel there is meant to be a list of coach-only pickups, but air and rail have slipped in.
As an example, please see the below:
Code:
[COLOR=#ff0000]Bury St Edmunds, Colchester, Ipswich, Flying from Norwich (NWI), Flying from Stansted (STN)[/COLOR]
So I need to remove everything after "Ipswich", including that last comma, I need to find the first instance of "Flying" and remove everything using that as a start point, to end up with the following:
Code:
[COLOR=#008000]Bury St Edmunds, Colchester, Ipswich[/COLOR]
This is more or less simple enough to do with FIND etc, but the problem is that sometimes the Airport or Rail pickups are buried in the middle, like this:
Code:
[COLOR=#ff0000]Birmingham, Flying from Birmingham (BHX), (RS) Birmingham New Street, Solihull, Sutton Coldfield[/COLOR]
Which would then need to be like this:
Code:
[COLOR=#008000]Birmingham, Solihull, Sutton Coldfield[/COLOR]
Can anyone help me urgently, I have to detect whether "Flying" or "(RS)" is within a set of commas (or at the end!) and then remove just those pickups including their respective commas to end up with just coach pickups (these don't have "(RS)" or "Flying from xxxx" in them)
Really appreciate it, thanks!
Last edited: