+ Reply to Thread
Results 1 to 4 of 4

Using VBA, want to return 2nd instance of a lookup value

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Using VBA, want to return 2nd instance of a lookup value

    I am able to do this in Excel using an array formula in Excel, but would like to be able to do this behind the scene using VBA so the formula in the cell is not erased. I have posted a simple worksheet to help explain. First tab would be the value entered, second and third tab would be where the results of the lookup is entered using vba and the fourth tab is the source of the vlookup. So on tab two it would enter the first serial # and on tab 3 it would enter the second serial number. Could someone help with the vba code for this? Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Using VBA, want to return 2nd instance of a lookup value

    Hello thecdnmole,

    You sample Workbook shows no array, or any formulae you are referring to in your post.

    Could you maybe upload a more complete 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

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Using VBA, want to return 2nd instance of a lookup value

    Ok Winon, how is this?
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Using VBA, want to return 2nd instance of a lookup value

    I think I have this figured out using vba, but now I have a problem with the formula, thus started a new thread. http://www.excelforum.com/excel-prog...n-formula.html
    If someone has a better way of doing this, please post! Thanks!

+ 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. Lookup a specific instance
    By burlywood66 in forum Excel General
    Replies: 1
    Last Post: 03-01-2010, 05:34 PM
  2. Finding the 2nd instance in a lookup
    By tuph in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-20-2007, 11:38 PM
  3. Lookup:for instance
    By snorrekatt in forum Excel General
    Replies: 1
    Last Post: 04-21-2007, 04:34 AM
  4. [SOLVED] Return only one instance
    By Pat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-09-2005, 07:06 PM
  5. Return only 1 instance in a list
    By jarvo in forum Excel General
    Replies: 4
    Last Post: 03-04-2005, 06:03 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