• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Highlight Selected Cell(s)

Alan Downie

New Member
Hi everyone
I am vision impaired and although I use magnification technology I still have difficulty locating a selected cell or cells on my screen. Is there anyway to automatically and temporarily change the colour of a selected cell in addition to the border highlight handle.

When the cell is deselected the highlight colour disappears and then shows in the newly selected cell. I would like the cell colour to change to high visibility Blue fill with yellow text.

Blessings to you all and thanks in advance

Alan
 
There certainly is. Try this:
http://chandoo.org/wp/2012/07/11/highlight-row-column-of-selected-cell-using-vba/

There's an example file to download and try out too. And also note that you don't have to use the colour that's being used. In fact, if you want the cell at the intersection of row and column highlighted a different colour - or want just the active cell to be highlighted - then this requires a very trivial change. Just sing out.
 
I am using the below since a long time.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Cells.Font.ColorIndex = 0
If IsEmpty(Target) Or Target.Rows.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
With ActiveCell
'for row
    With Range(Cells(.Row, .CurrentRegion.Column), _
        Cells(.Row, .CurrentRegion.Columns.Count + .CurrentRegion.Column - 1))
        .Interior.Color = vbBlue
        .Font.Color = vbYellow
    End With
'for column
    'Range(Cells(.CurrentRegion.Row, .Column), _
        Cells(.CurrentRegion.Rows.Count + .CurrentRegion.Row - 1, .Column)).Interior.ColorIndex = 40
End With
Application.ScreenUpdating = True
End Sub
 
Hi everyone
I am vision impaired and although I use magnification technology I still have difficulty locating a selected cell or cells on my screen. Is there anyway to automatically and temporarily change the colour of a selected cell in addition to the border highlight handle.

When the cell is deselected the highlight colour disappears and then shows in the newly selected cell. I would like the cell colour to change to high visibility Blue fill with yellow text.

Blessings to you all and thanks in advance

Alan
Hi,

There's an Excel addin called rowliner and it's excellent. Follow this link.


http://www.cpearson.com/excel/RowLiner.aspx
 
Hi,

There's an Excel addin called rowliner and it's excellent. Follow this link.


http://www.cpearson.com/excel/RowLiner.aspx
Thank You Mike H. I downloaded this add in and it works perfectly.
To the others who responded, the conditional formatting option with a small VBA code, suggested by Jeffrey Weir also worked but only on the one worksheet. Unless I miss-read or did something wrong seem I would have to set this up for every ws in every wb.
I must admit I did not try the code suggested by Deepak as the add-in was free and seemed a simpler solution.

On a protocol note, I have clicked the "like" button for Mike H's solution and have typed this reply to him. Am I supposed to reply to all suggestions separately or is combining them in this reply to Mike H acceptable. Please forgive me if I have offended anyone, it was unintentional.

Once again thanks and blessings to everyone for their kind replies. I am amazed that there are so many kind people out there.

Alan
 
For Whole workbook you may try something like this...

Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Cells.Font.ColorIndex = 0
If IsEmpty(Target) Or Target.Rows.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
With ActiveCell
'for row
   With Range(Cells(.Row, .CurrentRegion.Column), _
        Cells(.Row, .CurrentRegion.Columns.Count + .CurrentRegion.Column - 1))
        .Interior.Color = vbBlue
        .Font.Color = vbYellow
    End With
'for column
   'Range(Cells(.CurrentRegion.Row, .Column), _
        Cells(.CurrentRegion.Rows.Count + .CurrentRegion.Row - 1, .Column)).Interior.ColorIndex = 40
End With
Application.ScreenUpdating = True
End Sub
 
Back
Top