+ Reply to Thread
Results 1 to 21 of 21

Vlookup?

  1. #1
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Vlookup?

    I知 not an expert w/ excel by any means and I知 trying to figure out a solution to a problem I have. I知 guessing this is probably a slam dunk for someone who is a regular user. Here is the situation. I have one tab that lists account numbers in one column and an identifier (type of account) listed in a second column. Then I have a second tab with the same account numbers but in many instances the account numbers are listed more than once. I want to be able to carry over that identifier in the first tab to the tab that lists the account numbers multiple times match it up. Does that make sense?

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Vlookup?

    On the second sheet, something like:

    Please Login or Register  to view this content.
    Where 'Sheet1'$A$1:$B$100 is your table on the first sheet.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    I must be doing something wrong. not working. here is what might be a better explaination. I'm trying ot carry over the identifier to Sheet 2


    Sheet 1

    Account Identifier
    123456 1
    789652 3
    564135 2
    562723 6


    Sheet 2

    Account Identifier
    123456
    123456
    123456
    789652
    564135
    564135
    562723

  4. #4
    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,929

    Re: Vlookup?

    Check to see if either set of numbers have a small green triangle in the top left corner. It could be that 1 set is text that just looks like a number. Where are the 2 sets coming from?
    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

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Vlookup?

    It might be that your account numbers in one sheet are proper numbers, but in the other sheet they are text values that look like numbers. Try either of these amendments to the formula that ConneXionLost gave you:

    =VLOOKUP(A2&"",'Sheet1'$A$1:$B$100,2,0)

    or:

    =VLOOKUP(A2+0,'Sheet1'$A$1:$B$100,2,0)

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    this doesn't appear to match up the identifier to the account number.

  7. #7
    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,929

    Re: Vlookup?

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like? That way, we can stop guessing

  8. #8
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Vlookup?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  9. #9
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    trying to pull the identifier in sheet 1 to sheet 2.
    Attached Files Attached Files

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Vlookup?

    Hi Elliott and welcome to the forum,

    Now that you've learned how to attach a sample file, see if my attached answers your question.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  11. #11
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    thank you. the formula works in theory on the sample but on my spreadsheet something isn't right. I have about 5,000 rows. The identifiers are not matching up with the account numbers and they just stop about halfway down the spreadsheet. for example on sheet 2 for those that populated the identifier its not correct. the remaining rows I get the N/A.

  12. #12
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Vlookup?

    Can you post a workbook that contains errors? Sanitize as necessary; before uploading.

  13. #13
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Vlookup?

    Sounds like you haven't used absolute references. Ensure you have the "$" signs as previously used.

  14. #14
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    my thought is the formula that was suggested is not taking into consideration the duplicate accounts for some reason. the number of accounts that were populated equals the number of accounts in sheet 1. after that it falls off the rails. sheet 2 has duplicate account numbers that need to be populated w/ the identifer.

  15. #15
    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,929

    Re: Vlookup?

    1. vlookup() finds the 1st matching record (or the 1 below where the match would have been, then stops looking
    2. did you extend the ranges down far enough?

  16. #16
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    this is my formula i'm using:

    =VLOOKUP(A2,Sheet1!A2:B1594,2,0)

  17. #17
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    definitely expanded the range all the way down. is vlookup to simple of a function for what i'm trying to do?

  18. #18
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Vlookup?

    You should use $ symbols in front of those row references, so they don't change when you copy the formula down. Alternatively, you could do this:

    =VLOOKUP(A2,Sheet1!A:B,2,0)

    then copy down.

    Hope this helps.

    Pete

  19. #19
    Registered User
    Join Date
    02-17-2015
    Location
    Boise, Idaho, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Vlookup?

    Have you considered trying an IF function? That is what I would do for this situation, maybe VLOOKUP is a better approach. But in sheet 2 column B I would use =IF(A2=Sheet1!$A$2,Sheet1!$B$2,IF(A2=Sheet1!$A$3,Sheet1!$B$3,IF(A2=Sheet1!$A$4,Sheet1!$B$4,IF(A2=Sheet1!$A$5,Sheet1!$B$5,""))))
    Maybe this is just the long-hand of what VLOOKUP would do but I like being able to see what all is going on.
    Attached Files Attached Files

  20. #20
    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,929

    Re: Vlookup?

    @ athompy, using IF's like that for a limited number of options is fine, and like you say, it can help show what you are doing. But beyond 4 or 4 options, it can become cumbersome and overly-complex. Functions like vlookup() are designed to andle these large volumes of criteria

    @ elliottcor, sometimes, making up dummy examples doesnt quite do your data justice, I think this is 1 of those times. Can you upload some data that is closer to what your real data looks like?

  21. #21
    Registered User
    Join Date
    02-17-2015
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    15

    Re: Vlookup?

    This was it Pete. Thx! 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. Replies: 3
    Last Post: 12-04-2014, 01:27 PM
  2. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  3. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  4. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  5. Replies: 5
    Last Post: 07-29-2009, 07:53 AM

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