Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Highlight Row of Selected Cell

  1. #1
    Join Date
    11th July 2004
    Location
    SoCal
    Posts
    3

    Highlight Row of Selected Cell

    I want to highlight the entire row where a selected cell is. For instance, I select a cell in row 5, I want the entire row to be highlighted. If I then select a cell in Row 8, I want Row 5 to return to normal, and Row 8 to be highlighted.
    Answers???

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    27th January 2003
    Location
    Auckland, New Zealand
    Posts
    396
    Quote Originally Posted by Joe Spy
    I want to highlight the entire row where a selected cell is. For instance, I select a cell in row 5, I want the entire row to be highlighted. If I then select a cell in Row 8, I want Row 5 to return to normal, and Row 8 to be highlighted.
    Answers???
    Hi Joe

    Have a look here for 2 methods

    http://www.xcelfiles.com/Excel02.html#anchor_54
    Kind Regards,
    Ivan F Moala From the City of Sails

    http://www.xcelfiles.com

  3. #3
    Join Date
    11th July 2004
    Location
    SoCal
    Posts
    3

    Highlight row of selected cell

    Ivan,

    Thanks for the link. However, the code there doesn't quite do what I want it to do. I will take a stab at it, though, on a test workbook.

    I only want this to work on a specific sheet in my workbook...not all sheets.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    27th January 2003
    Location
    Auckland, New Zealand
    Posts
    396
    Place the code in the Worksheet that you want it to work in....post back if you require help
    Kind Regards,
    Ivan F Moala From the City of Sails

    http://www.xcelfiles.com

  5. #5
    Join Date
    11th July 2004
    Location
    SoCal
    Posts
    3

    Highlight Row of Selected Cell

    Thanks for the help. I did paste the code in the right place. It worked as advertised, but it wasn't what I wanted. I instead changed the Range to look like the following:

    Range("A" & Target.Row, Target.EntireRow)

    This fixed the problem and selects the entire row of the selected cell. PERFECT!

    -- Joe

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    31st December 2005
    Posts
    4

    Re: Highlight row of selected cell

    I only want this to work on a specific sheet in my workbook...not all sheets.[/QUOTE]

    Try this code:
    VB:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range) 
         
        ActiveSheet.Rows(Target.Row).Select ' highlite entire row
        Target.Activate ' select the cell
         
    End Sub 
    
    
    Last edited by royUK; December 31st, 2005 at 17:10. Reason: add code tags

    Excel Video Tutorials / Excel Dashboards Reports


  7. #7
    Join Date
    22nd October 2010
    Posts
    1

    Re: Highlight Row of Selected Cell

    Here is an easy way for coloring the corresponding row of your selected cell

    1. Choose an empty cell on your worksheet (e.g. $A$200 in this example)

    2. Place this code in the Worksheet_SelectionChange event:
    (press ALT+F11)

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ActiveSheet.Range("A200").Value = Target.Row
    End Sub

    The code will set the row value in the spefified cell ($A$200) each time a cell is selected

    3. Set a Conditional formatting rule for all cells you want to highlight:
    set the conditional formatting-formula as follows:

    =ROW()=$A$200

    Good Luck!

    Pro-Profit.nl

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    11th May 2012
    Posts
    2

    Re: Highlight Row of Selected Cell

    Hey newbie here haha. I would very much appreciate some help with highlighting rows in excel whenever the characters: "Rx", "R", "C", and "S" are entered down column A8 - A (any #).

    I would to highlight the rows: RX - Red; R - Orange; C - Green and ; S- Yellow. I would appreciate the VBA code as I continually keep screwing it up haha. Thanks in advance


    Lonnie

    Excel Video Tutorials / Excel Dashboards Reports


  9. #9
    Join Date
    8th April 2012
    Posts
    33

    Re: Highlight Row of Selected Cell

    You can use conditional formatting to do that. You'll need to lock the comparison to the first column and apply it to the rows you want starting with row 8. The formula and applies to sections should be something like: =$A8="RX" and: Sheet1!$8:$999 respectively.

    Excel Video Tutorials / Excel Dashboards Reports


  10. #10
    Join Date
    11th May 2012
    Posts
    2

    Re: Highlight Row of Selected Cell

    Quote Originally Posted by _lh View Post
    You can use conditional formatting to do that. You'll need to lock the comparison to the first column and apply it to the rows you want starting with row 8. The formula and applies to sections should be something like: =$A8="RX" and: Sheet1!$8:$999 respectively.
    Excel 2003 would only allow me to do conditional formatting with 3 conditions/colours only From what I understand, having 4 conditions I require VBA code to do that.
    could yourself or anyone else help me with the code or a way around the CF limit?

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 12
    Last Post: July 20th, 2013, 15:31
  2. Highlight Cells Matching Selected Cell
    By Chimero in forum EXCEL HELP
    Replies: 3
    Last Post: February 18th, 2008, 18:04
  3. Replies: 5
    Last Post: March 1st, 2006, 19:23
  4. Change selected cell outline/highlight color
    By JJacob in forum EXCEL HELP
    Replies: 8
    Last Post: January 7th, 2006, 18:29
  5. Highlight Selected Cell
    By ADEL in forum EXCEL HELP
    Replies: 14
    Last Post: October 27th, 2004, 20:15

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
  •  
porno