+ Reply to Thread
Results 1 to 9 of 9

VLookup returning same data when multiples exist

  1. #1
    Registered User
    Join Date
    12-03-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    VLookup returning same data when multiples exist

    Hi Gurus, I have spent a weekend trying to get the table attached to work using False, True, $ and the usual suspects. Any feedback to point me in the right direction would be id didly good.

    It seems to half work. Basically I am trying to do a Vlookup from one sheet to another. The aim is to send toner prices for customer requests. A customer usually tells me the model number of the printer they have. This would be used to pull in data using Vlookup to complete the description and price. The problem is one model number may have several or more toners so I need to include all these in the table. It seems to work at the beginning of the template returning the correct data when I have say model number 5 with 3 different toners but later it just keeps bringup the same data and not the corresponding data it should.

    Any ideas whats going wrong? Please help before I jump off a bridge!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-25-2010
    Location
    Abu dhabi
    MS-Off Ver
    Excel 2007, Excel 2010, Excel 2013
    Posts
    24

    Re: VLookup returning same data when multiples exist

    Hi,

    Try using the vlookupnth function. follow the link below.

    http://www.vbaexpress.com/kb/getarticle.php?kb_id=8

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: VLookup returning same data when multiples exist

    Try this

    Column C now contains a drop-down from a dynamic named list for unique Model Numbers.
    When a selection is made in Column C, a new dropdown is created in Column D with the Part Numbers relevant to that Model. When a selection is made from there the remaining data is filled.

    You are making life hard for yourself by using merged cells.
    I can see no reason for merging the rows in columns E:I, J:K, & LM
    If I were you I would reconsider the sheet layout using column widths to get the best and easiest solution.

    Avoid merged cells for all cells that contain tabulated data, better still, avoid them altogether!!!

    Hope this helps
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Lightbulb Re: VLookup returning same data when multiples exist

    Try use $ sign in table array argument of Vlookup function. I have changed the formula in

    above few rows check and copy down.

    See attached sheet
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-18-2010
    Location
    Johannesburg South Africa
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: VLookup returning same data when multiples exist

    I,m very impressd with Marcol's answer to the problem.
    My alternative do not involve macros.
    Ad a suffix to the model numbers ie. -1,-2,-3 etc. and Bob's your uncle.
    See attachment
    Regards
    Dan
    Attached Files Attached Files
    Last edited by DanExel; 12-13-2010 at 09:08 AM. Reason: Spelling again

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: VLookup returning same data when multiples exist

    @ mahju

    This is what is required, your amendment, although correct in principle, i.e. using $ anchors, doesn't return this.

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: VLookup returning same data when multiples exist

    I have an idea about this thread so i think this should be shared.
    It may be used by other users also if not used by thread starter

    Thanks

    Regards
    Attached Files Attached Files
    Mark the thread as solved if you are satisfied with the answer.


    In your first post under the thread tools.

    Mahju

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: VLookup returning same data when multiples exist

    I also have an idea about this thread.

    Its DEAD as a doornail.

    Laserfast has not replied once since posting in December last year!

  9. #9
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: VLookup returning same data when multiples exist

    Quote Originally Posted by Marcol View Post
    I also have an idea about this thread.

    Its DEAD as a doornail.

    Laserfast has not replied once since posting in December last year!
    Respected sir,
    I am sorry for the time you have spent on reading and replying my msg.
    I just answer because i think thread is interesting and may be used by new user and guest.

    I shall try not to reappraise any dead question (Not followed for more than 7 days) in future

    Thanks
    and
    Best regards

+ 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