+ Reply to Thread
Results 1 to 7 of 7

Pulling in all SSNs with a certain city and state in an Excel table

  1. #1
    Registered User
    Join Date
    09-26-2018
    Location
    New York, New York
    MS-Off Ver
    Excel 2016
    Posts
    4

    Pulling in all SSNs with a certain city and state in an Excel table

    I think the solution here is an array formula, but I'm not familiar with those and thought I'd ask before trying to learn.

    I have a large table with personal information including city and state. I am creating, on a separate tab, a drop down where you can select city and state, and it pulls in the names and SSNs of all the people who match that city and state. I was able to create the drop down, but I don't know what formula to put in the SSN column of this table so that all SSNs appear based on the cities and states selected in the drop down.

    For instance, if I chose New York in the City and State drop downs, I want to produce a list that shows 00000001...Jane Doe, 000000002...John Smith neatly in the table without having to do any work manually. Extra points if I can make it so there is always a border on the last item in the table (e.g., if I choose Reno Nevada next and there are only 3 people who fit the criteria, I'd like for the border to shift up too)

    Let's say the data is on a tab name 'Data' with SSNs in column A, Names in column B, States in column C and Cities in column D.

    ** Disclaimer, it's not actually cities, states and SSNs that I'm using, but I thought it was a simple example. **

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    Hello and welcome the forum.

    I recommend uploading a small representative sample of your data along with the desired results (which you can enter manually) based on that data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    .
    ** Disclaimer, it's not actually cities, states and SSNs that I'm using, but I thought it was a simple example. **
    Certainly hope that is true. Cuz I'd wonder what you are doing with all those SS numbers.

  4. #4
    Registered User
    Join Date
    09-26-2018
    Location
    New York, New York
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    Okay, I believe I added an attachment with a simple sample, including my notes on what I would like to happen
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-26-2018
    Location
    New York, New York
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    No worries, it's a different unique identifier.

  6. #6
    Registered User
    Join Date
    09-26-2018
    Location
    New York, New York
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    bump

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Pulling in all SSNs with a certain city and state in an Excel table

    Try this in A7:

    =IFERROR(INDEX(Data!A:A,SMALL(IF((Table1[City]=$B$2)*(Table1[State]=$B$3),ROW(Table1[SSN])),ROWS($1:1))),"") Ctrl Shift Enter

    Drag the formula through D7 then down as far as needed.

+ 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. Build a table of Continent, Country, County, State, and City
    By JamesArmitage in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-16-2018, 09:35 AM
  2. Excel Zip Code Match, Return City, State
    By bsacco in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-08-2016, 01:59 PM
  3. Pulling company name, street address, city, state, and zip from address
    By UNREAL2K4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-13-2015, 12:53 PM
  4. [SOLVED] Pulling City State and Zip into three different cells
    By Nuccio92 in forum Excel General
    Replies: 12
    Last Post: 07-08-2015, 01:55 PM
  5. Replies: 4
    Last Post: 04-16-2014, 04:59 PM
  6. [SOLVED] how do I separate 1 excel column to read city, state, zip columns
    By usndiv in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2006, 05:40 PM
  7. [SOLVED] identify city, state zip
    By Dave B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2005, 11:05 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