+ Reply to Thread
Results 1 to 6 of 6

SSN's in different formats for lookup

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Fishers, IN
    MS-Off Ver
    Excel 2007
    Posts
    11

    SSN's in different formats for lookup

    Hello. I have a file that was pulled from a system where the social security number came across as "general" with all the leading zeros and dashes. i.e. 005-12-3456. I have another file that has data that I want to pull into the first file but the SSN on that one came across as a "number" in the following format: 5123456. How do I get these two numbers to talk to each other in a lookup table? I have tried changing the format on both to Special--Social Security Number. I still get #N/A as the result. I checked for trailing spaces and there are none; but if I retype the social security number in the lookup table it does pull the data correctly. What else can I try? Thanks.
    Last edited by GMKoehler; 07-18-2013 at 02:07 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: SSN's in different formats for lookup

    This is a little tough since we tend to ask for a sample file with sensitive data removed. Can't ask for that as your file is only sensitive data.

    System pulls sometime inject extra spaces or other funky characters into strings without them being readily visible. Have you tried running every value through TRIM(CLEAN( )) then pasting special the values before running your lookups?
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: SSN's in different formats for lookup

    You could use a convenient columns to convert the numeric values to the same format:

    =TEXT(A1, "000-00-0000")

    Copy, paste as values, and delete the original column.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    01-08-2013
    Location
    Fishers, IN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Unhappy Re: SSN's in different formats for lookup

    Quote Originally Posted by Craig K. View Post
    This is a little tough since we tend to ask for a sample file with sensitive data removed. Can't ask for that as your file is only sensitive data.

    System pulls sometime inject extra spaces or other funky characters into strings without them being readily visible. Have you tried running every value through TRIM(CLEAN( )) then pasting special the values before running your lookups?
    This did not work. It just took the cell formatted as Special--Social Security Number back to the number format without the leading zeros that I started out with. Errrgh. Thanks for helping, though.

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    Fishers, IN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: SSN's in different formats for lookup

    Ahh, this worked. I had to change the original SSN and the one in the lookup table using the =text(a1,"000-00-0000") formula and it works! Thanks you!!!

  6. #6
    Registered User
    Join Date
    01-08-2013
    Location
    Fishers, IN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Smile Re: SSN's in different formats for lookup

    Quote Originally Posted by Craig K. View Post
    This is a little tough since we tend to ask for a sample file with sensitive data removed. Can't ask for that as your file is only sensitive data.

    System pulls sometime inject extra spaces or other funky characters into strings without them being readily visible. Have you tried running every value through TRIM(CLEAN( )) then pasting special the values before running your lookups?
    Actually, after I converted the SSN to text using the =text(cell,"000-00-0000"), I did discover I had trailing spaces as well. Then I still had to do a =TRIM(SUBSTITUTE(D4,CHAR(160)," ")) to get rid of the spaces. Finally after all that the lookup worked! Thanks to both of you.

+ 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. Problem copying Page formats and print formats to another workbook
    By Chrisgeni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 08:05 AM
  2. Replies: 10
    Last Post: 01-12-2012, 06:35 PM
  3. Lookup data from dissimilar formats
    By BRISBANEBOB in forum Excel General
    Replies: 4
    Last Post: 01-19-2010, 11:39 PM
  4. Lookup and Data Formats
    By statenja in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2008, 11:12 AM
  5. V-Lookup for numbers in various formats
    By rena in forum Excel General
    Replies: 4
    Last Post: 08-16-2007, 04: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