+ Reply to Thread
Results 1 to 8 of 8

Names from column based on Country.

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Names from column based on Country.

    Hi Friends,

    I want city names from Perticular country shown in column. Actually I know Indirect formula using back end data. Can I get directly from table.

    Please see attachment for better understanding.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Names from column based on Country.

    This ARRAY formula will give you a list of all cities...
    =IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$9=$B$14,ROW($A$2:$A$9)),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Names from column based on Country.

    Thank you FDibbins, I want Dropdown list for those cities.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Names from column based on Country.

    =INDEX($B$2:$B$9,MATCH($B$14,$A$2:$A$9,0)):INDEX($B:$B,LOOKUP(2,1/($A$2:$A$9=$B$14),ROW($A$2:$A$9)))
    Try this formula in data Validation
    Data Validation >Settings > Allow = List > Source = =INDEX($B$2:$B$9,MATCH($B$14,$A$2:$A$9,0)):INDEX($B:$B,LOOKUP(2,1/($A$2:$A$9=$B$14),ROW($A$2:$A$9)))
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Names from column based on Country.

    Hi rajesh,

    As Mr. Ford suggested formula will give you the list of searched country's city lists. I have used his formula in E2 and drag it down.

    Now you must create a name manager , do press- Alt-M-N->New->Name ( can use whatever you want without any space) and put =OFFSET($E$2,,,COUNTIF(E:E,"*?")) refers to section.

    On b15 cell press -> Alt-A-V-V -Allow-List->Source- Press F3-> Select the same name what you created in name manager then ok.

    That's it.

    Check the attached file.
    Attached Files Attached Files
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  6. #6
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Names from column based on Country.

    Hi nflsales, Below message coming:
    You may not use reference operators (such as unions, intersections, and ranges) or array constants for data validation criteria.

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Names from column based on Country.

    Quote Originally Posted by rajeshn_in View Post
    hi nflsales, below message coming:
    You may not use reference operators (such as unions, intersections, and ranges) or array constants for data validation criteria.
    see the attached file
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Names from column based on Country.

    Hi nflsasles, Attached file have some problem. Not opening.

+ 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] Returning a value from 1 column based on the country/region
    By kafarrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-29-2017, 04:25 PM
  2. [SOLVED] How can I get country name based on city names in the columns
    By alipezu in forum Excel General
    Replies: 10
    Last Post: 11-29-2016, 02:50 AM
  3. Identifying cells that contain country names
    By croaky in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2013, 09:11 AM
  4. Dynamic graph source, country names in outline column
    By Amsterdam22 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2013, 08:21 AM
  5. Replies: 5
    Last Post: 01-13-2012, 03:20 PM
  6. Add ‘country name’ column to worksheet from a list of country codes.
    By Ben Morton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2009, 09:24 AM
  7. List for country names
    By starguy in forum Excel General
    Replies: 3
    Last Post: 05-29-2006, 02:35 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