+ Reply to Thread
Results 1 to 4 of 4

Colour in cells where two criteria matches

  1. #1
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Colour in cells where two criteria matches

    Hi all,

    Bit of a toughy here, and not really sure how to go about it.

    I have a spreadsheet of data on Sheet1, which is a table of data. Column M contains a URN and there will be a matching number to this, that links to a location in Sheet2.

    If the number in Column M AND AE on Sheet1 (o2, 3, EE, Vodafone) matches the numbers AND the network in the table on Sheet 2, then cells M:T should be coloured by the colour of the location in Column B on the table in Sheet2.

    The table in Sheet 2 is dynamic and will change, so could be A:J from A1 down to J100.

    There will be number matches between Sheet1 and Sheet2, but where there is no network match - these are to stay uncoloured, it is only where both match.

    The same then needs to be applied to column U, where the number needs to match the numbers in Sheet 2 and again AE needs to match the network in Sheet2.

    Sheet1 in the attached file shows where numbers and the network in Sheet2 match they are coloured up.

    Not sure how to go about it.
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Colour in cells where two criteria matches

    Try this macro.

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going the view ribbon in Excel
    Martin

  3. #3
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Colour in cells where two criteria matches

    Hi mrice,

    Unbelievable, thank you very much. Almost there, it works perfectly for matching the number in Column M and network in AE, but only colours M, not M to T and then there is nothing coloured for any number and network matches in Column U and AE.

    But it is brilliant. Thank you

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Colour in cells where two criteria matches

    Amended version to colour M - T

    Please Login or Register  to view this content.

+ 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] Populate cells when a cell matches another criteria
    By Catsonheat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-17-2017, 09:23 AM
  2. Returning all that matches criteria across more cells
    By Andrew87.. in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2016, 03:37 PM
  3. [SOLVED] Indenting cells with VBA where value in another cell matches criteria
    By barefaced66 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-19-2015, 10:46 AM
  4. Crosschecking cells and removing matches based on a criteria.
    By ravogt91 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2014, 07:20 AM
  5. [SOLVED] Populating cells with data that matches certain criteria
    By coach.32 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 10:13 PM
  6. Replies: 5
    Last Post: 10-19-2012, 07:42 AM
  7. Counting cells that matches any of multiple criteria
    By JeePee in forum Excel General
    Replies: 2
    Last Post: 10-02-2011, 07:34 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