+ Reply to Thread
Results 1 to 10 of 10

Highlight row header

  1. #1
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Highlight row header

    So, I have a worksheet that is large enough that when a user enters a value in a cell that is so far from the row header on column B, the users sometimes enter the value on the wrong row. Is there a way with VBA or conditional formatting to highlight a cell when another cell is clicked. For example, if the user clicks on AD107 before he/she enters a value that B107 is filled with certain color, once the mouse clicks elsewhere, like AC100, the fill in B107 goes away and B100 is highlighted/filled?

  2. #2
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Highlight row header

    Why not freeze header panes?

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Highlight row header

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. After you enter a value anywhere in the sheet and exit the cell, the corresponding cell in column B of that row will be selected for input. Will this work for you?
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Highlight row header

    Quote Originally Posted by Billy Spivy View Post
    Why not freeze header panes?
    Yes, that would help, but some users to scroll enough for the freeze to be effective.

  5. #5
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Highlight row header

    Quote Originally Posted by Mumps1 View Post
    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. After you enter a value anywhere in the sheet and exit the cell, the corresponding cell in column B of that row will be selected for input. Will this work for you?
    Please Login or Register  to view this content.
    This seems simplistic and works, but if I can have the situation as I described would be ideal.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Highlight row header

    Please Login or Register  to view this content.
    You should freeze the header row...
    Attached Files Attached Files
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Highlight row header

    Wow, ProtonLeah, that worked like a champ. How do I make it work only in certain worksheets?

  8. #8
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Highlight row header

    ProtonLeah, do you think you can modify the code so that once the user clicks in another tab that the previous highlight goes away? I noticed that when every tab that had a cell clicked, the columns and row highlight is remained.

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Highlight row header

    Try this mod:

    Delete conditional formatting from sheet1 or sheet3 when clicking another tab
    Please Login or Register  to view this content.
    Add conditional formatting only to sheet1 and sheet2 when selected
    Please Login or Register  to view this content.
    Replacing "Sheet1/3" by your actual names where you want to highlight rows/columns
    Last edited by protonLeah; 01-05-2018 at 06:24 PM.

  10. #10
    Registered User
    Join Date
    03-04-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Highlight row header

    Thanks, Leah. I just back checking these codes. Truly appreciate it. This almost works great for my application, except for the fact that I do have conditional formatting already built in that allows the user to search. It basically highlights cells that contain strings that are entered in a particular cell, so the Cells.FormatConditions.Delete doesn't work here. Is it possible not to delete the condition formatting for certain rows? The aforementioned cells that are highlighted are basically in row 1, 2, and 3?

+ 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. Helped needed to index match row header, column header, and sheet
    By vw103604 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2016, 12:37 PM
  2. Need to copy header row in group to all rows below header; stop if blank and repeate
    By jmcaleer10 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2013, 11:09 AM
  3. Highlight Header when AutoFilter On UDF
    By twilling in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2013, 02:16 PM
  4. Replies: 0
    Last Post: 11-28-2007, 06:46 AM
  5. how to set highlight for row/column header
    By Jasmine in forum Excel General
    Replies: 0
    Last Post: 02-06-2006, 03:40 AM
  6. How to set highlight for the column&row header of the active cell
    By Jasmine in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2006, 11:40 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