RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
So close!!
Every time I add a new requested feature it seems to break something else, oh me oh my.
Explanation:
I need to find a way to match the whole word only, between commas.
The problem is that to my understanding, I need to use wildcards.
I'm putting them in a formula in column W, like this:
So I am looking down about 30,000 rows in a database for tours that have a match to any one of the five pickups in the above formula (because only two are valid, the final three are blank) I then filter down to any lines in Column W >0, and this is an example where the sum of the countif is 1
Unfortunately, you can see that Chesterfield has come in.
What this means is that adverts for tours are going in papers for CHESTER, which is not really near enough to CHESTERFIELD.
I don't really know how to solve this formulaeically and my VBA knowledge isn't advanced enough to search a specific INSTR... Can anyone help? Thanks.
Every time I add a new requested feature it seems to break something else, oh me oh my.
Explanation:
- We have a paper with a set number of pickups where tours can be selected from, say "Wrexham, Chester"
- These pickups in the string are separated out using the comma as a delimiter, so "Wrexham" and "Chester"
- They are then sandwiched in wildcards and used to search against the "Whole Route" of a tour, so "*Wrexham*" "*Chester*"
- The whole route of a tour is a long string of pickups, between 5-120 pickups long, example:
Code:
Slough, Staines, High Wycombe, Oxford Services (M40), Bicester, Banbury, Warwick, Leamington Spa, Coventry, Solihull, Aylesbury, Princes Risborough, Thame, Stratford-upon-Avon, Alcester, Redditch, Bromsgrove, Sutton Coldfield, Walsall, Telford, Wellington (Shrops.), Shrewsbury, Oswestry, Wrexham
- I'm looking to gather a list of tours, where there is a match of the pickups within the whole route. Because "Wrexham" appears in that whole route string, it is a match.
- The problem is that I am determining "*Chester*" and this will pull through "Chesterfield" "Manchester" etc
I need to find a way to match the whole word only, between commas.
The problem is that to my understanding, I need to use wildcards.
I'm putting them in a formula in column W, like this:
Code:
=SUM(COUNTIF(I2,{"*Wrexham*","*Chester*","*Blank*","*Blank*","*Blank*"}))
So I am looking down about 30,000 rows in a database for tours that have a match to any one of the five pickups in the above formula (because only two are valid, the final three are blank) I then filter down to any lines in Column W >0, and this is an example where the sum of the countif is 1
Code:
Coalville, Ashby-de-la-Zouch, Swadlincote, Burton-upon-Trent, Derby, Belper, Ripley (Derbs.), Alfreton, Chesterfield, Leeming Bar Services (A1(M)), Sheffield, Rotherham, Barnsley, Wakefield, Dewsbury, Morley, Leeds, Huddersfield, Brighouse, Halifax, Bradford, Harrogate, Knaresborough, Ripon
Unfortunately, you can see that Chesterfield has come in.
What this means is that adverts for tours are going in papers for CHESTER, which is not really near enough to CHESTERFIELD.
I don't really know how to solve this formulaeically and my VBA knowledge isn't advanced enough to search a specific INSTR... Can anyone help? Thanks.