ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format a New View? (https://www.excelbanter.com/excel-discussion-misc-queries/162626-format-new-view.html)

Jayne Mae

Format a New View?
 
Is there any way to create a custom view that would highlight the entire
column and row with the color of my choice when a single cell is selected?
This would sure help my eyes when working on large spreadsheets. I currently
use the freeze panes function but would like this addition as well. Any help
would be greatly appreciated

Kevin B

Format a New View?
 
Add the following code to the worksheet module of your choice and assign it
to the worksheets SelectionChange event. However, this will slow things down
a bit as you move about the worksheet.

------------------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim lngRow As Long
Dim intCol As Integer

lngRow = Target.Row
intCol = Target.Column

Application.ScreenUpdating = False
ActiveSheet.Cells.Interior.ColorIndex = xlNone

Range(Cells(lngRow, 1), Cells(lngRow, 256)). _
Interior.ColorIndex = 3
Range(Cells(1, intCol), Cells(65536, intCol)). _
Interior.ColorIndex = 3

End Sub
------------------------------------------------------------------------------------------------

--
Kevin Backmann


"Jayne Mae" wrote:

Is there any way to create a custom view that would highlight the entire
column and row with the color of my choice when a single cell is selected?
This would sure help my eyes when working on large spreadsheets. I currently
use the freeze panes function but would like this addition as well. Any help
would be greatly appreciated


Gord Dibben

Format a New View?
 
Download Chip Pearson's RowLiner add-in to gain this functionality.

http://www.cpearson.com/excel/RowLiner.htm

Easily customizable for colors and line weights.


Gord Dibben MS Excel MVP

On Thu, 18 Oct 2007 11:41:03 -0700, Jayne Mae
wrote:

Is there any way to create a custom view that would highlight the entire
column and row with the color of my choice when a single cell is selected?
This would sure help my eyes when working on large spreadsheets. I currently
use the freeze panes function but would like this addition as well. Any help
would be greatly appreciated



Gord Dibben

Format a New View?
 
But be aware that this event code will wipe out any existing background
formatting you may currently have.


Gord Dibben MS Excel MVP

On Thu, 18 Oct 2007 14:31:04 -0700, Kevin B
wrote:

Add the following code to the worksheet module of your choice and assign it
to the worksheets SelectionChange event. However, this will slow things down
a bit as you move about the worksheet.

------------------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim lngRow As Long
Dim intCol As Integer

lngRow = Target.Row
intCol = Target.Column

Application.ScreenUpdating = False
ActiveSheet.Cells.Interior.ColorIndex = xlNone

Range(Cells(lngRow, 1), Cells(lngRow, 256)). _
Interior.ColorIndex = 3
Range(Cells(1, intCol), Cells(65536, intCol)). _
Interior.ColorIndex = 3

End Sub
------------------------------------------------------------------------------------------------



Jayne Mae

Format a New View?
 
Thank you Kevin. I appreciate your help

"Kevin B" wrote:

Add the following code to the worksheet module of your choice and assign it
to the worksheets SelectionChange event. However, this will slow things down
a bit as you move about the worksheet.

------------------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim lngRow As Long
Dim intCol As Integer

lngRow = Target.Row
intCol = Target.Column

Application.ScreenUpdating = False
ActiveSheet.Cells.Interior.ColorIndex = xlNone

Range(Cells(lngRow, 1), Cells(lngRow, 256)). _
Interior.ColorIndex = 3
Range(Cells(1, intCol), Cells(65536, intCol)). _
Interior.ColorIndex = 3

End Sub
------------------------------------------------------------------------------------------------

--
Kevin Backmann


"Jayne Mae" wrote:

Is there any way to create a custom view that would highlight the entire
column and row with the color of my choice when a single cell is selected?
This would sure help my eyes when working on large spreadsheets. I currently
use the freeze panes function but would like this addition as well. Any help
would be greatly appreciated


Jayne Mae

Format a New View?
 
Thank you as well Gord. I appreciate the additional information and link.

"Gord Dibben" wrote:

Download Chip Pearson's RowLiner add-in to gain this functionality.

http://www.cpearson.com/excel/RowLiner.htm

Easily customizable for colors and line weights.


Gord Dibben MS Excel MVP

On Thu, 18 Oct 2007 11:41:03 -0700, Jayne Mae
wrote:

Is there any way to create a custom view that would highlight the entire
column and row with the color of my choice when a single cell is selected?
This would sure help my eyes when working on large spreadsheets. I currently
use the freeze panes function but would like this addition as well. Any help
would be greatly appreciated





All times are GMT +1. The time now is 02:52 AM.

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