+ Reply to Thread
Results 1 to 12 of 12

Highlight cell based on selected cell - Code required

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    England
    MS-Off Ver
    2003/2010/365
    Posts
    119

    Highlight cell based on selected cell - Code required

    Required:
    If my mouse has selected cell C31, Excel automatically highlights cell I31.

    I need this to be the same for the whole of row C and I, so any cell I select will highlight the corresponding cell. Likewise, if cell is not selected, it will not be highlighted.

    If anyone is able to provide me with VMA code with this, I'd be very grateful

    Many thanks!

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Highlight cell based on selected cell - Code required

    Is it want you want

    Please Login or Register  to view this content.
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    09-18-2014
    Location
    England
    MS-Off Ver
    2003/2010/365
    Posts
    119

    Re: Highlight cell based on selected cell - Code required

    Almost.

    If I move my the selected cell up and down, the previous cell does not come un-highlighted. Can this be changed?

    Many thanks!

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    Try:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    Try:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-18-2014
    Location
    England
    MS-Off Ver
    2003/2010/365
    Posts
    119

    Re: Highlight cell based on selected cell - Code required

    John, tried this and nothing happened?

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    Test the test sheet and see if this does what you want?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-18-2014
    Location
    England
    MS-Off Ver
    2003/2010/365
    Posts
    119

    Re: Highlight cell based on selected cell - Code required

    Unfortunately not, thanks for your help though

    In short, if the cell in the name box is in row C, then highlight yellow the corresponding cell in row I.

    Capture.PNG

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    Then maybe:

    Please Login or Register  to view this content.
    Same code different event. Just change to Selection Change event.

  10. #10
    Forum Contributor
    Join Date
    09-18-2014
    Location
    England
    MS-Off Ver
    2003/2010/365
    Posts
    119

    Re: Highlight cell based on selected cell - Code required

    Exactly what I wanted :D

    Thanks John!

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    Then maybe:

    Please Login or Register  to view this content.
    Same code different event. Just change to Selection Change event.
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight cell based on selected cell - Code required

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. Auto Filtering based on Cell Value? Code Required.
    By SharpL in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-19-2014, 10:01 AM
  2. Replies: 3
    Last Post: 09-08-2014, 10:36 AM
  3. Replies: 1
    Last Post: 09-05-2014, 08:40 AM
  4. [SOLVED] Highlight row based on selected cell value
    By elevdown in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2012, 11:28 AM
  5. Highlight the cell based on selected value
    By maximpinto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2009, 02:20 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