+ Reply to Thread
Results 1 to 7 of 7

vba - check value and vlookup, jump to next collum same row and return vlookup again

  1. #1
    Registered User
    Join Date
    10-16-2015
    Location
    LX
    MS-Off Ver
    2007
    Posts
    4

    vba - check value and vlookup, jump to next collum same row and return vlookup again

    vba - check value and vlookup, jump to next collum same row and return vlookup again. If blank skip to next cell in new row

    Hello Guys

    I work on excel for a couple of years but only recently started to create solutions in VBA.

    I need your assistence for a challenge i found.

    I have the following table:
    table.png

    On a diferent sheet i require to "prepare" the information with a certain template.

    The code value as 2 associated values "This is the data", and "This is the data2" they are never equal.

    My chalenge is to vlookup the value of "code" and return "This is the data" and reaply the cenario for "This is the data2".

    But "This is the data2" can be NULL. if Null the macro need to skip this cell and jump to the next "This is the data" cell and restart the process.

    This is required for over 5000 values.

    can you mr wizards give a hand? im strugling with this.

    Thanks in advance
    Last edited by Elitdarkphoenix; 10-16-2015 at 11:41 AM. Reason: add table

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: vba - check value and vlookup, jump to next collum same row and return vlookup again

    Can you give an example output of what you want based on the sample input above?
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: vba - check value and vlookup, jump to next collum same row and return vlookup again

    Your picture doesn't seem to include "This is the data" nor "This is the data2".

    Attach a small sample workbook instead with just enough data to demonstrate your data. Make sure your desired results are shown, mock them up manually so we can see exactly the goal based on the sample data.

    Remember to desensitize the data.

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

    View Pic
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    10-16-2015
    Location
    LX
    MS-Off Ver
    2007
    Posts
    4

    Re: vba - check value and vlookup, jump to next collum same row and return vlookup again

    Thanks for the quick reply guys

    I have attached the "original" table and the desired result on the 2nd sheet.
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: vba - check value and vlookup, jump to next collum same row and return vlookup again

    Formula in E2, copied down:

    =VLOOKUP(D2, DATA!B:G, 5 + (D1=D2), 0)

  6. #6
    Registered User
    Join Date
    10-16-2015
    Location
    LX
    MS-Off Ver
    2007
    Posts
    4

    Thumbs up Re: vba - check value and vlookup, jump to next collum same row and return vlookup again

    Hey JBeaucaire
    thank you for the elegant solution.

    It works.

    When you think you know a lot of excel, someone can always surprise us

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: vba - check value and vlookup, jump to next collum same row and return vlookup again



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. 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. sum of a collum if cell contains letter and divide by number of letters in collum
    By cheesemarathon in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-19-2015, 08:46 AM
  2. Check for multiple vlookup return values
    By mgblair in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2015, 06:03 PM
  3. Help using vlookup to return multiple results for one vlookup value
    By Akmon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2015, 06:00 AM
  4. Replies: 1
    Last Post: 02-20-2014, 08:42 AM
  5. [SOLVED] vlookup of two items to return a third vlookup value into a cell
    By PhoenixFaery in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2013, 07:33 PM
  6. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  7. Go to Special or other function to jump to vlookup source?
    By andy62 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-06-2006, 01:55 PM

Tags for this Thread

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