+ Reply to Thread
Results 1 to 11 of 11

Vlookup i think.............

  1. #1
    Registered User
    Join Date
    02-16-2017
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    30

    Vlookup i think.............

    Hi All

    Newbie here looking for some help please.

    I'm working on a spread sheet where I need the information from multiple columns in one spread sheet (Component Costs) and return them to a master worksheet (Master), however it only returns the first row.

    The components worksheet as around 31K rows and 10 columns, however I only need the information from 4 only these columns.

    Here is the formula I have used, =VLOOKUP(B4,'Component Cost'!A2:J31011,6,FALSE) for each column and I've attached images of worksheets to help.

    Thanks
    Aide

  2. #2
    Registered User
    Join Date
    02-14-2017
    Location
    Hosle, Norway
    MS-Off Ver
    2013, 365, 2016
    Posts
    35

    Re: Vlookup i think.............

    Hi.

    I think you need to use a sum if function instead of vlookup. The latter only returns the first value.

    Also, It looks like you forgot to "lock" the formula so you might get the wrong result for the next rows.

    When you use A2:J31011 and copy down the formula, the next row will have formula A3:J31012

    I suggest using A:J instead. The function will search all rows. I

    Best regards Tbez

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: Vlookup i think.............

    Hi Aide and welcome to the forum.

    One of the drawbacks of lookup functions ... as you have discovered ... is that they only return the first / last match in a range. We have to get creative.

    Secondly I notice that the Component Part# data in 'Master' appears to be numeric while in 'Component Cost' they appear to be text "numbers".
    Excel does not recognize them as the same. Text has the numeric value of 0 while real numbers have the numeric value of ... well their numeric value.

    You will need to change the lookup value to text or the range that has "numbers" to numbers.

    Thirdly I am guessing you will need to lookup both the Fork Part# and the Component Part# at the same time to get a unique match. This will likely require an array formula.

    But first things first.

    You usually get more and faster solutions if you upload a small Excel workbook. We can't do much with pictures.

    If you are not aware of how to do this:

    To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    • Be sure to desensitize the data ! ! !
    The file name will appear at the bottom of your reply.

    Look forward to your post.
    Dave

  4. #4
    Registered User
    Join Date
    02-16-2017
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: Vlookup i think.............

    Thanks both for your replies and the warm welcome Flameretired

    Here is a simple workbook, if you can guide me in the right direction it would be much appreciated.

    Thanks
    Aide
    Attached Files Attached Files

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: Vlookup i think.............

    There are trailing spaces in Component Part# of 'Component Cost'. Those need to be eliminated or this won't work. I cleaned them in the attached.

    Then array enter this formula in D2 of 'Master' fill down and across. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-16-2017
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: Vlookup i think.............

    Hi,

    Sorry, I am really a newbie and don't understand the concept of array enter formula, also when I enter the formula into D2 it didn't seem to do anything.

    Aide

  7. #7
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,416

    Re: Vlookup i think.............

    I offer an option to the formula without a massive input.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Vlookup i think.............

    Hi,

    Formulas can be good for a situation like this, but sometimes they can be more trouble than they are worth.

    A Pivot Table can be very effective for this type of lookup. Add in a Slicer and you have easier access to returning the data you want.

    The attached is a modified version of your file with a Pivot Table and Slicer on your Master sheet.

    Hope this is helpful.

    Cheers
    Attached Files Attached Files

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: Vlookup i think.............

    Quote Originally Posted by Aide View Post
    Hi,

    Sorry, I am really a newbie and don't understand the concept of array enter formula, also when I enter the formula into D2 it didn't seem to do anything.

    Aide
    What did it do? Did you commit that formula from edit mode with Ctrl + Shift + Enter? You will know an array entered formula is properly committed when you see 'curly' braces {} surrounding the formula in the formula bar. You don't type those in yourself. Excel does it for you. If you do you will get an error.

  10. #10
    Registered User
    Join Date
    02-16-2017
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: Vlookup i think.............

    Quote Originally Posted by Czeslaw View Post
    I offer an option to the formula without a massive input.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi Czeslaw

    Your formula worked thanks, however my original workbook has about 31000 rows in the component cost worksheet and I'm unable to emend your formula so it can return these. I think this is the part of the formula which requires changing 'Component Cost'!$A$2:$A$28=$B$4). Can you please advise how I can emend the formula?

    Thanks
    Aide

  11. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,416

    Re: Vlookup i think.............

    Increased range up to 40,000.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 5
    Last Post: 12-07-2016, 09:18 AM
  2. [SOLVED] When vlookup ragnes is mutiple: How do vlookup value finding occurrence against coresspond
    By silambarasan.J in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 07-07-2015, 09:32 AM
  3. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  4. 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
  5. how to bring all vlookup returns even with duplicate vlookup search keys
    By NYC4LIFE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2013, 04:53 PM
  6. 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
  7. 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