ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I auto highlight the row and column I'm working on? (https://www.excelbanter.com/excel-discussion-misc-queries/244412-how-do-i-auto-highlight-row-column-im-working.html)

Cindy P

How do I auto highlight the row and column I'm working on?
 
My spreadsheet is so large that it would be easier for me if the program
automatically highlighted the column and row I am working on. Does anyone
know if that's possible?

Bob Umlas[_3_]

How do I auto highlight the row and column I'm working on?
 
As long as you're not using any other color scheme, right-click the sheet
tab, select View Code, enter this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Target.EntireColumn.Interior.ColorIndex = 6
Target.EntireRow.Interior.ColorIndex = 6
End Sub


"Cindy P" <Cindy wrote in message
...
My spreadsheet is so large that it would be easier for me if the program
automatically highlighted the column and row I am working on. Does anyone
know if that's possible?




KC

How do I auto highlight the row and column I'm working on?
 
Thanks for this question, was helpful for me as well to think through the
solution.

Insert 2 lines (place is anywhere on your sheet)
from Insert Pictures Auto Shapes
double click on the line and set the line color to BLUE and increase the
weight to 2.25 or any thickness you think is prominent.

then right-click the sheet tab View Code enter the below code:

'Beginning of code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Shapes("Line 1").Left = ActiveCell.Left
ActiveSheet.Shapes("Line 1").Top = ActiveCell.Top - 10
ActiveSheet.Shapes("Line 1").Height = ActiveCell.Height + 20
ActiveSheet.Shapes("Line 1").Width = 0

ActiveSheet.Shapes("Line 2").Left = ActiveCell.Left - 10
ActiveSheet.Shapes("Line 2").Top = ActiveCell.Top
ActiveSheet.Shapes("Line 2").Height = 0
ActiveSheet.Shapes("Line 2").Width = ActiveCell.Width + 20
End Sub

'End of Code


the above code would work assuming that the 2 lines you added was the only
first two lines in your workbook, else we need to find the right line name
and add it.

-kc
*Click YES if this helps


"Cindy P" wrote:

My spreadsheet is so large that it would be easier for me if the program
automatically highlighted the column and row I am working on. Does anyone
know if that's possible?



All times are GMT +1. The time now is 05:39 PM.

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