ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Highlighting Active Cell? How? (https://www.excelbanter.com/excel-discussion-misc-queries/113375-highlighting-active-cell-how.html)

skint

Highlighting Active Cell? How?
 
Hi all

When I have lists in excel numbers down the left and numbers across the
top, is it possible for the active cell i.e say 5 down and 4 across to
be highlighted when that cell is selected?
If so how?

Many thanks


Bob Phillips

Highlighting Active Cell? How?
 
'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"skint" wrote in message
ups.com...
Hi all

When I have lists in excel numbers down the left and numbers across the
top, is it possible for the active cell i.e say 5 down and 4 across to
be highlighted when that cell is selected?
If so how?

Many thanks




Paul B

Highlighting Active Cell? How?
 
skint, you may also want to look at Chip's row liner addin here
http://www.cpearson.com/excel/RowLiner.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"skint" wrote in message
ups.com...
Hi all

When I have lists in excel numbers down the left and numbers across the
top, is it possible for the active cell i.e say 5 down and 4 across to
be highlighted when that cell is selected?
If so how?

Many thanks





All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com