+ Reply to Thread
Results 1 to 3 of 3

Highlight rows with the same content as a column

  1. #1
    Registered User
    Join Date
    06-28-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    2

    Highlight rows with the same content as a column

    Hi All,
    Relatively new to excel programming. Worked with Actionscript, Python, and Google Sheets.

    Anyways, my question: In the table I have now, I have a bunch of columns, each referring to a specific person. The first cell is the name, and the rest are attributes (has freckles, dislikes vegetables, etc). I want to make it so that when you select a row, each other row that shares a filled cell is highlighted. For examples, Ellie is selected, her filled in attributes are has freckles and dislikes vegetables. John has "has freckles" filled in as well, so when ellie is selected, john's row is highlighted.

    Is this sort of interaction possible in Excel programming? If so, how exactly would I do it?
    Thanks!

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Highlight rows with the same content as a column

    Okay, sounds like you are a programmer and probably would do better with some 'teaching' rather than a straight solution. Basically, you want to use event handlers; specifically, the worksheet SelectionChange event which will occur whenever a new cell or range is selected.

    Here is a good page on events in general:
    http://www.cpearson.com/excel/Events.aspx
    Here is the microsoft page on the SelectionChange event:
    https://msdn.microsoft.com/EN-US/lib.../ff194470.aspx

    Then, to find common text, you can use the .find method:
    https://msdn.microsoft.com/en-us/lib.../ff839746.aspx
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    06-28-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    2
    This is perfect I'll try it out tonight. And yeah lol

    Quote Originally Posted by Pauleyb View Post
    Okay, sounds like you are a programmer and probably would do better with some 'teaching' rather than a straight solution. Basically, you want to use event handlers; specifically, the worksheet SelectionChange event which will occur whenever a new cell or range is selected.

    Here is a good page on events in general:
    http://www.cpearson.com/excel/Events.aspx
    Here is the microsoft page on the SelectionChange event:
    https://msdn.microsoft.com/EN-US/lib.../ff194470.aspx

    Then, to find common text, you can use the .find method:
    https://msdn.microsoft.com/en-us/lib.../ff839746.aspx

+ 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. Replies: 1
    Last Post: 05-14-2013, 06:46 PM
  2. [SOLVED] Highlight rows w/ same column value
    By wotaj in forum Excel General
    Replies: 3
    Last Post: 05-03-2012, 02:27 PM
  3. [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
  4. Replies: 1
    Last Post: 10-09-2008, 01:00 PM
  5. Have to add more rows bases in a column content
    By notuo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2007, 09:50 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