+ Reply to Thread
Results 1 to 10 of 10

Vlookup

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2014
    Location
    Dundee
    MS-Off Ver
    Excel 2013
    Posts
    14

    Vlookup

    Looking for a drop of help with the VLOOKUP function, or suggestions for an alternative.

    I have two sets of data.

    The first holds the correct values, by part. The second has the same part but with an aged column.

    I need to feed the age from the second to the first report, giving me an aged inventory report.

    I have put the VLOOKUP formula in and i get a number of problems:-

    1) if i enter the formula and use the "true" argument most of the data brought over are correct, but a number are incorrect
    2) if i enter the formula and use the "false" argument all lines come back #N/A


    These are huge data sets, and it was just by chance, when validating the results that it came to my attention that the dates were incorrect in some lines.

    Advice would be much appreciated.


  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup

    You can try adding a wildcard to the lookup value
    =VLOOKUP(A1&"*",range,colindex,FALSE)

    So if A1 is "Hello", but in the first column of the lookup range you have "Hello There", that would be a match.

    Can you post 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

  3. #3
    Registered User
    Join Date
    04-13-2014
    Location
    Dundee
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Vlookup

    Thanks Jonmo1.

    I just popped a bit of data into my excel and put the VLOOKUP formula in and it works a treat. When i put an extra space in it comes up with the NA result.

    This makes me think that the data is not exactly formatted the same arggghhhh this makes me worried, i already did the find and replace to remove extra spaces and i cant think what else might be causing the error.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup

    Why did you put in an extra space?

    Post a sample book..

  5. #5
    Registered User
    Join Date
    04-13-2014
    Location
    Dundee
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Vlookup

    VLOOKUP.xlsx

    Not sure if thats attached.

    When i say i added another space, what i meant was i added a space in the part text to see why i was getting the NA.

    This is an exceptionally simplified version of my actual data.

    The VLOOKUP formula does work but i get the feeling that there is a problem with the actual text if you know what i mean.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup

    I don't see a problem...
    After removing the "intentionally added" extra spaces from A2 and A3, all 4 vlookups work just fine..

  7. #7
    Registered User
    Join Date
    04-13-2014
    Location
    Dundee
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Vlookup

    thats what i though! So i double checked my formula in my actual workbook and its still not working.

    Couple of points which might give rise to another formula (suggestions always appreciated!)

    There are parts in both worksheets which are not relevant.
    The data is not sorted, because of the problem above.

    But like i say the data set is massive. Page one is 23000 lines and second page is 39000 lines.

    Is there another look up formula that might work do you know? I can physically check all these by tomorrow, this should have been done today!!! But when i checked my results it screamed ERROR at me and my mind when into overdrive!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup

    Yes, that's a problem when using FALSE
    Quote Originally Posted by Stuck14 View Post
    I think the problem is that it isnt an exact match.

    And This is a problem when using TRUE
    Quote Originally Posted by Stuck14 View Post
    The data is not sorted, because of the problem above.
    You seem to be stuck between a rock and a hard place.

    The wildcards+FALSE was the best option I could think of, but that apparently doesn't work in your case.
    Afraid I can't offer any further help without seeing a more realistic sample set of data.
    Last edited by Jonmo1; 07-01-2015 at 02:46 PM.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup

    Your formula is fine.
    =VLOOKUP(A2,Aging!A:C,3,FALSE)

    If you get #N/A, it means the value in A2 doesn't have an EXACT match in column A on the Aging sheet.
    Spelling is off, or there are extra spaces in the cells.

    You can try the wildcard method as I suggested, but it can be expanded to be used at both front and end of A2
    =VLOOKUP("*"&A2&"*",Aging!A:C,3,FALSE)

  10. #10
    Registered User
    Join Date
    04-13-2014
    Location
    Dundee
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Vlookup

    Tried wildcard. Again it brought the wrong date over.

    I think the problem is that it isnt an exact match. I wonder if it matters that one report came out as an excel export and one came out as a CSV orginally? I have copied the test over to work to check for spaces etc, but it appears clean.

    Oh lordy this is driving me totally crazy!

    Thanks for the tips though

+ 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: 0
    Last Post: 12-26-2013, 01:12 PM
  2. 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
  3. 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
  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