+ Reply to Thread
Results 1 to 5 of 5

Vlookup with 2 criteria help

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Vlookup with 2 criteria help

    Hello,

    I found VBA code online that seems to be written to look up on 2 or more conditions.
    I need help modifying it to fit my UserForm that takes data from a table on "Raw Data" tab and inserts it into a different table on "All" tab.

    In the UserForm Column 3 will be entered into TextBox4 and Column 4 into TextBox5.
    Criteria: Look up Column 3 (from TextBox4) and Column 4 (TextBox5)
    If Column 4 is 0 then display Column 5 in TextBox13 and display Column 6 in TextBox14
    If Column 4 is greater than 0 then display Column 7 in TextBox13

    The code that I found online and needs to be modified:
    Please Login or Register  to view this content.
    If new code is esier to write, then you can ignore what i found.
    Thanks!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Vlookup with 2 criteria help

    Attach 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 then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Vlookup with 2 criteria help

    I have tried to attach the file and picture but this would not allow me to do so. After many attempts, I got something that works. The code is not pretty and I would appreciate it if you could look at it and condense it.

    Please Login or Register  to view this content.
    Thank you!

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Vlookup with 2 criteria help

    If the workbook is too big to attach, then you are probably including too much sample data. However, you can compress the workbook and attach it as a zip file.

  5. #5
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Vlookup with 2 criteria help

    It was not the size of the workbook that it did not like, it was lack permission. This forum would not allow me to attach any files.
    The code that I have attached works, but it is not "pretty"

+ 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. Vlookup several criteria
    By B&L in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-28-2015, 11:03 AM
  2. Large multi criteria / Vlookup/Choose Multi criteria
    By deanusa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2014, 01:48 AM
  3. [SOLVED] Vlookup with more than 1 criteria
    By Grimace in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2013, 08:06 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. vlookup with more than 2 criteria
    By erlindafb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-13-2012, 03:22 AM
  6. vlookup with two criteria
    By hollister22nh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-25-2006, 07:45 AM
  7. [SOLVED] two criteria in a vlookup
    By CMAC in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2005, 02:06 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