Solved Create a new table using .. (1 Viewer)

Number11

Member
Local time
Today, 20:46
Joined
Jan 29, 2020
Messages
607
So i dont think its going to be possible, i need to create a new data table that has a Y or N next to each postcode...

Short Postcode Delivery Availability
BN1 Y
BN3 Y
BN45 Y
BN17 N
BN18 N

and so on..

this is the only data source have :(
BNBN1,3,454
BNBN11,14-156
BNBN12-13,1614
BNBN17-180
BNBN2,9-106
BNBN20-21,25-2622
BNBN22-24,2722
BNBN5,41-442
BNBN6-83
 

Minty

AWF VIP
Local time
Today, 20:46
Joined
Jul 26, 2013
Messages
10,371
You would have to build a custom function to extract the numbering, and the spacing seems inconsistent, which would make it more interesting.
Would you need 41-44 split out to 41,42,43,44 as well?
 

Number11

Member
Local time
Today, 20:46
Joined
Jan 29, 2020
Messages
607
You would have to build a custom function to extract the numbering, and the spacing seems inconsistent, which would make it more interesting.
Would you need 41-44 split out to 41,42,43,44 as well?
Yeh i thinks its really a long shot
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:46
Joined
May 7, 2009
Messages
19,245
how do you determine which has Y and which has N?
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:46
Joined
Sep 21, 2011
Messages
14,315
how do you determine which has Y and which has N?
I took it to be those with a number > 0 ?
Not sure why the BN2x are on different records?
@Number11 How do you get that data in the first place?
 

isladogs

MVP / VIP
Local time
Today, 20:46
Joined
Jan 14, 2017
Messages
18,239
It may be easier to start again by obtaining a complete list of postcodes data, one postcode per record.
Do you only need Brighton (BN) postcodes or the whole of the UK?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:46
Joined
May 7, 2009
Messages
19,245
here is a query using VBA.
see FinalQuery.
 

Attachments

  • BN.accdb
    936 KB · Views: 78

Number11

Member
Local time
Today, 20:46
Joined
Jan 29, 2020
Messages
607
@arnelgp

so its throwing up some incorrect data.. example is this postcode

BSBS24-29, TA8-9
results here..
its not picking up TA8-9 but creating BS0 >
IDBNExpr1Expr2Expr3Expr4Expr5Expr6Expr7Expr8Expr9Expr10Expr11Expr12Expr13Expr14Expr15Expr16Expr17Expr18Expr19Expr20Expr21Expr22Expr23Expr24Expr25VALUEYN
1891BSBS24BS25BS26BS27BS28BS29BS0BS1BS2BS3BS4BS5BS6BS7BS8BS910Y
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:46
Joined
Sep 21, 2011
Messages
14,315
Why on earth have you got TA8-9 on a BS record? :(
 

Minty

AWF VIP
Local time
Today, 20:46
Joined
Jul 26, 2013
Messages
10,371
They might be in a grouped area.
BS being Bristol area and TA Taunton, it's possible they border each other?
 

Number11

Member
Local time
Today, 20:46
Joined
Jan 29, 2020
Messages
607
They might be in a grouped area.
BS being Bristol area and TA Taunton, it's possible they border each other?
Yes thats correct the issue is that the query is not populating the TA postcodes TA8 & TA9 instead its created postcodes BS0-BS9 I think its because the Area is set as BS so the VBS is getting confused not sure If that can be corrected
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:46
Joined
May 7, 2009
Messages
19,245
here i change the code, and also Query1.
on data table, i added "BS24-29, TA8-9".

see query1 and finalQuery.
 

Attachments

  • BN.accdb
    572 KB · Views: 70

Gasman

Enthusiastic Amateur
Local time
Today, 20:46
Joined
Sep 21, 2011
Messages
14,315
Yes thats correct the issue is that the query is not populating the TA postcodes TA8 & TA9 instead its created postcodes BS0-BS9 I think its because the Area is set as BS so the VBS is getting confused not sure If that can be corrected
Sorry, I cannot fathom how a TA postcode should be in a BS record.
Swansea where I live is SA. I live in SA4. Pemboke which is miles away and has Carmarthenshire between Swansea and Pembrokeshire still has SA codes?
What is the next anomaly you are going to produce? :(
 

Minty

AWF VIP
Local time
Today, 20:46
Joined
Jul 26, 2013
Messages
10,371
I suspect that the number count is for an area, that includes a set of postcodes, not necessarily in a single postcode area, but geographically grouped. as you can see below:

1681306254037.png


TA8 and TA9 border BS23-28, so that grouping makes sense geographically, well it does to me.
 

Users who are viewing this thread

Top Bottom