+ Reply to Thread
Results 1 to 4 of 4

Script to highlight content between two sheets that match based on column and row headers

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Script to highlight content between two sheets that match based on column and row headers

    I have a mock up below:

    example.PNG

    The cells are pre-populated with X. The condition for it to be highlighted in green is when for a certain column and row header, where an "x" is found in both tables, the x in one (or two) tables gets highlighted.

    Is this doable?
    Attached Files Attached Files
    Last edited by leepox; 07-28-2016 at 10:40 AM.

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Script to highlight content between two sheets that match based on column and row head

    This sounds doable, but many of us (myself included) cannot view image posts. Would it be possible to upload a small sample workbook (Use: Go Advanced --> Manage Attachments)?

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: Script to highlight content between two sheets that match based on column and row head

    I have attached it now

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Script to highlight content between two sheets that match based on column and row head

    You should be able to do this with conditional formatting. If you want Sheet 2 to show the highlighting, select B2:F4, Conditional Format using a formula, and input the following formula:

    =AND(B2="x",INDEX(Sheet1!$B$2:$F$4,MATCH($A2,Sheet1!$A$2:$A$4,0),MATCH(B$1,Sheet1!$B$1:$F$1,0))="x")

    If you want to highlight on Sheet 1 as well, repeat the process but switch out the sheet names in the formula. I've attached a version with the formatting on sheet 2 to demonstrate. Take a look and let me know if it works for you.
    Attached Files Attached Files

+ 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] Print sheets based on content in a column
    By whoknows in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2015, 10:13 AM
  2. Replies: 2
    Last Post: 12-09-2015, 05:43 AM
  3. [SOLVED] VBA code to compare rows based on 4 column values and highlight is no match
    By Sirilias in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2015, 02:22 PM
  4. Inserting column headers text before the content of each cell in a column
    By Spacedone in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2014, 10:18 AM
  5. Find and highlight cells in workbook that is NOT an exact match to the cell content
    By AndyHowcroft in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-30-2013, 12:05 AM
  6. [SOLVED] Highlight a cell if its content doesn't match another cells content
    By noxygen in forum Excel General
    Replies: 4
    Last Post: 04-12-2012, 04:36 AM
  7. [SOLVED] ActiveX script to read in column headers from Excel
    By Andy S. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2005, 12:05 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