+ Reply to Thread
Results 1 to 5 of 5

Input Postcode and Output Yes/No based on lookup

  1. #1
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Input Postcode and Output Yes/No based on lookup

    I have a postcode file (attached).

    I want this file to have a userform that allows the user to type in a four digit postcode (numbers only) and the form will display "Yes" if that postcode is Remote or Very Remote according to the list of data in the Location tab.

    If it's not Remote or Very Remote (ie. one of the other options) then the form should display "No".

    If the Locality field happens to be blank or N/A or something not currently listed then the form should diplsay "No locality for that postcode"

    I want the userform to be visible the entire time the workbook is open.

    It can have either a button to check the postcode or be automatic if there are 4 valid digits entered.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,622

    Re: Input Postcode and Output Yes/No based on lookup

    Create an UserForm (note it's properties - it is modeless) and in a form code something like:

    Please Login or Register  to view this content.
    THen in thisworkbook code something to automatically open the form. I added also a command button to show the form if it's accidentally closed.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Input Postcode and Output Yes/No based on lookup

    Thanks Kaper,

    Works well, except for case when there is a zero as the first digit, eg. 0803

    The "numbers" in Column A are actually text as some of our postcodes have a zero at the beginning.

    Is there a way to modify the macro for these cases?

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Input Postcode and Output Yes/No based on lookup

    Sorry Kaper, I missed an error in your code;
    Please Login or Register  to view this content.
    All works great.

    Thanks

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,622

    Re: Input Postcode and Output Yes/No based on lookup

    Glad to hear so.
    And thanks for marking thread SOLVED and for reputation point.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] lookup formula and looking up the next row if input already output
    By gilpin004 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-31-2017, 09:45 AM
  2. [SOLVED] Display values based on input / output table
    By zdimitrov in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2015, 09:12 PM
  3. Lookup postcode zone from postcode
    By Elmholt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2013, 09:26 AM
  4. Defined output based on Input given
    By dheeraj27 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2013, 12:43 PM
  5. Defined output based on Input given
    By dheeraj27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2013, 12:33 PM
  6. Populate Output sheet based on input data and lookup condition
    By Cool\m/ in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-10-2013, 04:45 AM
  7. Using text box input to lookup number and replace based on user input into new column
    By harl3y412 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2011, 03:15 PM

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