Les,
I found it here
http://www.evoxfacilities.co.uk/evoxar.html
and here
http://www.evoxfacilities.co.uk/pcdarea.htm
If AC did ever get used, I think it would be easy to change Rick's code
to accommodate. The part
Parts(0) Like "A[0-9BL]#*"
changes to
Parts(0) Like "A[0-9BCL]#*"
and you have to ask whether you validate for valid current postcodes or
valid possible postcodes. If they were rapidly changing, maybe the
latter, but as they don't, I think the former.
BTW, looked at your website. If you ever need any Excel/VBA consultancy
....
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
Bob
I honestly don't know whether, say, AC will ever get used, but as the
'rules' allow it I think it would be safest to allow it in my data. The
risk of someone complaining that I didn't allow their (AC...) postcode
is greater than the risk of my allowing a valid but unassigned
postcode. I am curious though where you found the list of assigned
postcodes?
Les
Well, it is a bit simpler Les!
BTW I bowed out of that thread because Rick cam back and has spent
more time on it in the past and understood the rules better (I just
spotted a logic flaw in his original code), and I don't want to
confuse that thread more, but I did look up current postcodes and see
that only AB and AL are valid. Do you really think that they may they
might add say AC? I had always thought that the regions (or whatever
they call them) were fixed, and any extra housing/towns would get a
sub id within the main region.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
Bob
I hardly dared ask you or Rick to look at this one, hence the new
thread: but many thanks for the answer.
And what's more, unlike the postcode validation code, I understand it
(and so can now adapt it to suit my more general requirement)!
Thanks again
Les
=OR(AND(S1=1,T1>=1,T1<=3),AND(S1=2,T1>=2,T1<=5),AND(S1=3,T1>=3,T1<=5),AND(S1=4,T1>=3,T1<=6,T1<>4))
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in
my addy)
Oops - that should have been "I need to validate data being entered
in COLUMN T ..."
Les
Hello All
I need to validate data being entered in row T according to the
entry in the same row in column S, i.e.
if S1=1 then T1 must be 1, 2 or 3
if S1=2 then T1 must be 2, 3, 4 or 5
if S1=3 then T1 must be 3, 4 or 5
if S1=4 then T1 must be 3, 5 or 6
etc.
There is no mathematical relationship betwen the S1 value and the
valid T1 values.
S1 must be between 1 and 15, so validation of S1 is simple, but I
have tried to get the conditional validation of T1 but just can't
get the syntax right!
Hope soneone can help.
Many thanks
Les