+ Reply to Thread
Results 1 to 5 of 5

Highlighting column and row headers using VBA

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    64

    Highlighting column and row headers using VBA

    Hello people

    I have a task in vba I'm trying to do and failing badly at so all help is appreciated as ever!

    I've attached an Excel file detailing what I'm looking for, I basically need some code that will highlight the row and column titles based on the cell that has been clicked on. Can anyone help please?

    Many thanks
    Kenny
    Attached Files Attached Files
    Last edited by Bonnister; 12-14-2012 at 09:26 AM. Reason: Wrong file attached

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Highlighting column and row headers using VBA

    "cell that has been clicked on"?
    which column, or you wish to click on?

  3. #3
    Registered User
    Join Date
    03-01-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Highlighting column and row headers using VBA

    Hi , i attached the wrong file to my original post but I've just uploaded the correct one which should make the question clearer! In the attached file, the range C3:J12 will be a named range for the VBA code to reference, if I then click on any cell within that named range (so for example, E8) the corresponding header in row 2 and the factor in column B will be highlighted

  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: Highlighting column and row headers using VBA

    Quote Originally Posted by Bonnister View Post
    Hi , i attached the wrong file to my original post but I've just uploaded the correct one which should make the question clearer! In the attached file, the range C3:J12 will be a named range for the VBA code to reference, if I then click on any cell within that named range (so for example, E8) the corresponding header in row 2 and the factor in column B will be highlighted
    Is there supposed to be another attachment?

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Highlighting column and row headers using VBA

    I was thinking of Conditional formatting, but it was too much thinking so I went with VBA

    Please Login or Register  to view this content.
    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)

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