+ Reply to Thread
Results 1 to 9 of 9

Find state by city name

  1. #1
    Registered User
    Join Date
    07-31-2017
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Find state by city name

    Hey friends,
    Can someone help me to create a sheet where I can get the State name by entering city name.
    For eg; When I put Barwon Downs(city) in column A, column B should reflect Victoria (state). Attached is the sheet with data.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Find state by city name

    With your city in A1 of another sheet, this in B1:

    =VLOOKUP(A1,CityLookup!A:B,2,0)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-31-2017
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Find state by city name

    Is there any solution where I do not have to run this formula everytime if want to find the state?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Find state by city name

    What do you mean? You just have to change the city in A1. If that's not what you want, then show us the expected outcome. There has to be a lookup list somewhere for Excel to refer to.

  5. #5
    Registered User
    Join Date
    07-31-2017
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Find state by city name

    I am really sorry for the trouble but I am new to excel. Could you show me the formula in the attached sheet?
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Find state by city name

    Type Barwon Downs manually into CityLookup!A1:

    Excel 2016 (Windows) 32 bit
    A
    B
    1
    Barwon Downs Victoria
    Sheet: CityLookup

    Copy and paste this into B1:

    =VLOOKUP(A1,Sheet3!A:B,2,0)

    and hit ENTER.

  7. #7
    Registered User
    Join Date
    07-31-2017
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Find state by city name

    Thank you very much...You are a life saver...

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Find state by city name

    Glad to have helped!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Find state by city name

    In another way.
    In sheet "CityLookup" in "A2" using datavalidation.
    In"B2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See attach file.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

+ 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] City and State Separation
    By burcha22 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2017, 04:40 PM
  2. Separate city state and zip
    By cape in forum Excel General
    Replies: 7
    Last Post: 11-16-2015, 07:48 PM
  3. Look Up a Corresponding State to Match a City
    By califorlina in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2015, 10:17 AM
  4. How to get rid of the city and state in the address?
    By excel1212 in forum Excel General
    Replies: 2
    Last Post: 09-08-2012, 05:30 PM
  5. Excel 2007 : city - state formula
    By aj_coolguy in forum Excel General
    Replies: 3
    Last Post: 04-30-2010, 02:52 AM
  6. [SOLVED] identify city, state zip
    By Dave B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2005, 11:05 AM
  7. [SOLVED] city, state, zip in same cell
    By whs2002 in forum Excel General
    Replies: 2
    Last Post: 04-29-2005, 02:06 AM

Tags for this Thread

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