#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Postcode validation

I'm creating a data input sheet for thousands of entries, and i want to
restrict the input cell for postcode to the following formats;

wf10 4nr = 2 letters followed by 2 numbers followed by a space
followed by 1 number then 2letters

or;

ln5 4de = 2 letters followed by 1 number followed by a space
followed by 1 number then two letters

so therefore if the data inputter types in anything other than the formats
shown above, a validation message will appear.

Can anyone help me?
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Postcode validation

This is the custom validation formula for format1:

=AND(CODE(LEFT(A1))=97,CODE(LEFT(A1))<=122,
CODE(MID(A1,2,1))=97,CODE(MID(A1,2,1))<=122,ISNUM BER(VALUE(MID(A1,3,2))),MID(A1,5,1)="
",ISNUMBER(VALUE(MID(A1,6,1))),CODE(MID(A1,7,1))= 97,CODE(MID(A1,7,1))<=122,
CODE(RIGHT(A1))=97,CODE(RIGHT(A1))<=122)


You can now create the formula for format2 by slight modification of the
above formula and insert it in the structure below:

OR(formula1,formula2)


Regards,
Stefi


€˛ChrisCasTigers€¯ ezt Ć*rta:

I'm creating a data input sheet for thousands of entries, and i want to
restrict the input cell for postcode to the following formats;

wf10 4nr = 2 letters followed by 2 numbers followed by a space
followed by 1 number then 2letters

or;

ln5 4de = 2 letters followed by 1 number followed by a space
followed by 1 number then two letters

so therefore if the data inputter types in anything other than the formats
shown above, a validation message will appear.

Can anyone help me?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Postcode validation

Good idea, Paul! It will work!
Stefi


€˛paul€¯ ezt Ć*rta:

wow that is GOOD stefi.Chris wach the line wrap at MID(A1,5,1)="
",ISNUMBER(VALUE(MID(A1,6,1))), should be
MID(A1,5,1)=" ",ISNUMBER(VALUE(MID(A1,6,1))),
I think.The code for space is 32 so maybe you could try
code(MID(A1,5,1))=32 .would that work stefi?
--
paul

remove nospam for email addy!



"Stefi" wrote:

This is the custom validation formula for format1:

=AND(CODE(LEFT(A1))=97,CODE(LEFT(A1))<=122,
CODE(MID(A1,2,1))=97,CODE(MID(A1,2,1))<=122,ISNUM BER(VALUE(MID(A1,3,2))),MID(A1,5,1)="
",ISNUMBER(VALUE(MID(A1,6,1))),CODE(MID(A1,7,1))= 97,CODE(MID(A1,7,1))<=122,
CODE(RIGHT(A1))=97,CODE(RIGHT(A1))<=122)


You can now create the formula for format2 by slight modification of the
above formula and insert it in the structure below:

OR(formula1,formula2)


Regards,
Stefi


€˛ChrisCasTigers€¯ ezt Ć*rta:

I'm creating a data input sheet for thousands of entries, and i want to
restrict the input cell for postcode to the following formats;

wf10 4nr = 2 letters followed by 2 numbers followed by a space
followed by 1 number then 2letters

or;

ln5 4de = 2 letters followed by 1 number followed by a space
followed by 1 number then two letters

so therefore if the data inputter types in anything other than the formats
shown above, a validation message will appear.

Can anyone help me?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Postcode validation

Thank you Paul and Steffi, you were most helpful

Cheers


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Postcode validation

You are welcome!
Stefi


€˛ChrisCasTigers€¯ ezt Ć*rta:

Thank you Paul and Steffi, you were most helpful

Cheers


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation with hyperlinks [email protected] Excel Worksheet Functions 1 June 8th 06 07:34 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
Copy workbook- Validation function sjs Excel Worksheet Functions 3 December 28th 05 03:00 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"