+ Reply to Thread
Results 1 to 9 of 9

help pulling data

  1. #1
    Registered User
    Join Date
    12-15-2009
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    help pulling data

    I need some help with an issued I am having.

    I am trying to pull data from one sheet into another sheet.

    sheet 1 I have 3 columns city | state | zip
    sheet 2 I have 3 columns city | zip | area

    I am trying to add a 4th column to sheet 1 where it is to show the area from sheet 2 based on the comparison of zips between zip 1 and 2.

    Sheet 1: Column A: Zip, Column B: City, Column C:State
    Sheet 2: Column A: City, Column B: Zip, Column C: Area

    Thank you in advance.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: help pulling data

    Try Vlookup()

    e.g

    =Vlookup(A2,Sheet2!B:C,2,0)

    Where A2 contains first ZIP to lookup in Sheet2

    Copy formula down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-15-2009
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: help pulling data

    I am not having any luck. With this formula. Is there any other way?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: help pulling data

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  5. #5
    Registered User
    Join Date
    12-15-2009
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: help pulling data

    I have attached the file. Let me know if you need more explanation. I thank you in advance for all your help.

    ***Updated with new worksheet with what I am looking to achieve.
    Attached Files Attached Files
    Last edited by ark1; 12-15-2009 at 04:33 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: help pulling data

    In Sheet1 D2, copied down
    Please Login or Register  to view this content.
    However, your zip codes on sheet1 are formatted as text, on sheet2 as numbers. Therefore you won't get any matches.

    One way to fix that, select column A of Sheet1. Go to "Text to Columns", click on "Finish" That should convert them to numbers.

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: help pulling data

    See attached.

    The problem was that your codes in Sheet1 are text strings, while in Sheet2 they are numeric... I changed Sheet1 by selecting column A and going to Data|Text to Columns and clicking Finish... this converted column A to General (numbers).

    Then the formula worked.

    Seeing as there are some that aren't found at all in Sheet2, I add an error handler to return a blank if the zip code doesn't exist in sheet 2.

    so new formula is: =IF(ISNA(VLOOKUP(A2,Sheet2!B:C,2,0)),"",VLOOKUP(A2,Sheet2!B:C,2,0))
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-15-2009
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: help pulling data

    Worked perfectly. You guys are the best. Thank you so much for everything.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: help pulling data

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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