+ Reply to Thread
Results 1 to 4 of 4

Address Information VLOOKUP

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Address Information VLOOKUP

    Hi All,

    I am fairly new to the more technical side of EXCEL.

    What I am trying accomplish is setting up a guest list that will automatically populate the state and postcode. We have had some customers that have entered incorrect details into these fields.

    The issue that I have is that there are some locality name is in more than 1 state and therefore there is more than 1 post code.

    for example the town "Raglan" there is one in NSW, VIC and QLD. I have tried a VLOOKUP however this is only populating the state with NSW and not identifying there is one in VIC and QLD

    I would like to have the state collumn identify this and require the person to select the state from the dropdown list and then the postcode populate with the correct postcode.

    I appreciate anyones help wth this!

    Cheers,

    Alan
    Attached Files Attached Files
    Last edited by alanpw; 10-08-2010 at 08:37 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Address Information VLOOKUP

    Hello,

    It would be much easier to tackle this the other way round, i.e. first enter the state, THEN enter the city name and THEN perform a lookup based on the state and city.

    If you don't insist on a drop-down box for state and/or city, but would be content for the postcode to show up only if both cells have been filled in, then both of these formulas will do the trick.

    =IF(COUNTA(D2:E2)=2,INDEX(AUSTPOST!B:B,MATCH(1,((AUSTPOST!C:C=E2)*(D2=AUSTPOST!A:A)),0)),"")

    This is an array formula and has to be entered with CTRL-Shift-Enter.

    or, an array free version

    =IF(COUNTA(D7:E7)=2,INDEX(AUSTPOST!B:B,MATCH(E7&D7,INDEX(AUSTPOST!C:C&AUSTPOST!A:A,0),0)),0)

    entered normally.

    See attached for both formulas at work.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Address Information VLOOKUP

    Hi Teylyn,

    Thanks.

    The reason I really need it to be in this layout is it we used in a Mail Merge for printing. Sorry that I omitted to include this.

  4. #4
    Registered User
    Join Date
    10-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    [SOLVED] Address Information VLOOKUP

    Thanks for your help. I have taken your advise on this one and set a data validation to ensure that the state has been entered from a dropdown list before the postcode is populated.

+ Reply to Thread

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