Results 1 to 37 of 37

Format Cells for UK Postcode

Threaded View

  1. #20
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Format Cells for UK Postcode

    Hi Mike

    In reply to your post #14

    The first code goes into a standard module as you have correctly done

    The second block of code goes in the sheet module for the sheet you want to control
    Right-click on the sheet tab of the relevant sheet and select > View Code
    Paste the second block of code in the resultant window.

    You need both modules to make this work

    See this example

    1/. Select the Country from the Drop-down in column K and run see the change in column J

    2/. Copy column A back into column J, this time select the country and run the macro "CheckPostCodes".

    Hope this helps

    P.S. I have slightly changed the function "FormatPostCode" to ensure that uppercase is returned
    Attached Files Attached Files
    Last edited by Marcol; 11-26-2010 at 11:32 AM. Reason: Typos

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1