Validate Canadian Postal codes in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Would like to validate columns containing Canadian Postal Code for accuracy.
Any idea how to program the validation tool?
 
One way is with a long if statement:

=if(and(mid(a1,1,1)>="A",mid(a1,1,1)<="Z",mid(a1,2,1)>="0",mid(a1,2,1)<="9",...),true,false)

I'm sure there are better ways, but I'll have to leave it up to people more
expert than I to provide them. It would help the non-Canadian posters to
this group to let them know the format of Canadian postal codes is A9A 9A9.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Input masks in Excel 1
?Validate Canadian Postal Code 5
Excel Cell Formats 4
Cdn Postal Code 3
canadian postal code 1
Zip code code 1
Postal Code 3
Postal Code 11

Back
Top