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

Highlighted Cell

Dick

New Member
I really enjoy seeing what can be done in Excel, thanks for your efforts. I have a question that I can’t seem to find an answer for; can I have the cell I am on change colors so I can more easily see where I am on the spreadsheet? This seems like it should be a built-in function in Excel but if it is I can’t find it. Thanks in advance for your reply.
 
Hi Dick,


Welcome to the Forums. I d'not know any inherent feature that can do the task but this post of Chandoo might help you:


http://chandoo.org/wp/2012/07/11/highlight-row-column-of-selected-cell-using-vba/


PS: Always mention the version of excel you are working with.


Regards,
 
Thanks for you fast reply. I am using 2010. I really would like to find a way to eith change the cell color or the frame around the cell.
 
Hi, Dick!


If you don't feel comfortable with the conditional formatting solution you may give a look at this file:

https://dl.dropboxusercontent.com/u/60558749/Highlighted%20cell%20%28for%20Dick%20at%20chandoo.org%29.xlsm


The code for ThisWorkbook is:

-----

[pre]
Code:
Option Explicit

' declarations
Dim lRow As Long, lColumn As Long

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
' constants
' declarations
' start
If Target.Cells.Count > 1 Then Exit Sub
' process
'  previous cell
If lRow > 0 And lColumn > 0 Then
With Cells(lRow, lColumn)
With .Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
With .Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End With
End If
' actual cell
With Target
With .Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
With .Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End With
' end
With Target
lRow = .Row
lColumn = .Column
End With
End Sub
[/pre]
-----


Just advise if any issue.


Regards!


PS: For frame only, check this link: http://www.mrexcel.com/forum/excel-questions/2026-border-around-active-cell.html
 
Back
Top