Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default How do I have a cell highlight when selected?

Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default How do I have a cell highlight when selected?

Rhonda,
This will change the interior color of the activecell to red whenever
the selection changes, regardless of how the cell was selected. Only
problem, it removes the interior color of all the other cells every
time to prevent leaving a trail of red cells. That means if you have
some other interior colors on your sheet, you will lose them. If you
want to use it, copy this code and paste it into the worksheet's module
(right-click on the worksheet's tab, select view code, and paste it in
there). James

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
ActiveCell.Interior.ColorIndex = 3
End Sub

Rhonda wrote:
Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default How do I have a cell highlight when selected?

You could use the following in the worksheet module for the sheet you want
the highlight to occur in. However, as you move through the worksheet, the
active cell has its interior set to blue, while all the other cells in the
workbook have a white interior, and this will replace all shading formatting
in the worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim ws As Worksheet

Set ws = Worksheets("CA RESULTS")
ws.Cells.Interior.Color = vbWhite

ActiveCell.Interior.Color = 127

Set ws = Nothing

End Sub

--
Kevin Backmann


"Rhonda" wrote:

Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How do I have a cell highlight when selected?

You have other replies at your other post.

Rhonda wrote:

Is there a way to click on any cell either with tab or arrow key and that
cell automatically highlights in a color such as red? This is requested so
that if a person is working in a long spreadsheet with alot of statistics,
they will be able to see the cell that they have selected as it will be
highlights. I tried to create a macro but could not figure out how to make
it automatically highlight a cell when selected throughout the spreadsheet.
Any help or suggestions will be greatly appreciated? Any other solutions
will be greatly appreciated!


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change cell text based on another selected cell? jjh Excel Discussion (Misc queries) 1 July 6th 06 01:14 PM
Comments Appearing When Cell Is Selected (Not Hovered Over) JB Christy Excel Discussion (Misc queries) 2 March 28th 06 09:57 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
how read value from last selected cell? It is possible? how get adress last selected cell? Andrzej New Users to Excel 4 May 30th 05 07:28 PM
How to highlight row and column of the selected cell Row_Column_Highlight Excel Discussion (Misc queries) 2 February 27th 05 10:48 PM


All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"