+ Reply to Thread
Results 1 to 2 of 2

VBA VLOOKUP with Multiple Criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    18

    Post VBA VLOOKUP with Multiple Criteria

    Hi all,

    I am having some problems getting the vba right for this vlookup function. I will breakdown my request below to aid understanding of what I am trying to achieve.

    - 2 sheets in workbook
    - 1st sheet contains core data
    - 2nd sheet holds referenece data

    - Sheet 1 columns D:J contain decimal values from rown 2 downto row 143
    - Sheet 2 contains the reference values in column A row 2 to row 168

    - In Sheet 1 column M I would like to be conditionally formatted either red or green depending on if any of the values within D:J match the values of column A in sheet 2.

    Hope that makes sence,

    All help provided will be much appreciated,

    Many Thanks,

    H
    Last edited by hemal89; 07-08-2015 at 07:53 AM.

  2. #2
    Registered User
    Join Date
    03-08-2014
    Location
    United Kingdom
    MS-Off Ver
    Office 2010, Office 2013 & Office 2016 / 365
    Posts
    23

    Re: VBA VLOOKUP with Multiple Criteria

    Hello,

    It is quite easy you need to create two different conditional formats:

    Choose "Use a formula to determine which cells to format"

    Now all you need is to use the match function. So for the green the first cell with the formatting would be:

    Formula: copy to clipboard
    =MATCH(D1:J1,Sheet2!$A:$A,0)<>0


    And for the red (no match)

    Formula: copy to clipboard
    =IsNa(MATCH(D1:J1,Sheet2!$A:$A,0))


    This can then be copied to other rows and excel will automatically change the row numbers.

    Thanks,

    Adam

+ 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. [SOLVED] Vlookup multiple criteria returning multiple values
    By ykobure in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-16-2015, 07:28 AM
  2. [SOLVED] iserror and vlookup with multiple criteria from multiple tables along with concatenation.
    By marcusduton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-14-2015, 02:16 AM
  3. Vlookup (or index/match) with multiple criteria over multiple sheets
    By Groovicles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2013, 01:56 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 + multiple criteria + multiple data returned
    By stonesy in forum Excel General
    Replies: 6
    Last Post: 02-17-2010, 08:53 AM

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