Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll Highlighting 1

Status
Not open for further replies.

jelenko

Mechanical
Jan 8, 2002
22
Does anyone know how to get excel to automatically highlight the row where the cursor is while you're scrolling? This woul help in focusing your attention on the information in that row while you are scrolling through a spreadsheet.
 
Replies continue below

Recommended for you

What I mean is that wherever the cursor is, to highlight the whole row. If the cursor is moved down one cell I want the whole row to highlight.
 
I understand and it sounds like a good idea to me!

Older versions of Excel (Excel 3 and 4, and maybe 5) had something like this feature when in "data entry mode". I haven't seen this feature in later versions of Excel, but maybe it's hiding someplace.
 
Sounds like something logical to me. I'm going blind looking at these sheets trying to focus on lines in worksheets. Anybody know a Microsoft Software Engineer out there?
 
Maybe I can help with the going blind part. I often will hit the "shift" key + space bar. This 1/4 second command "selects" the entire row of the worksheet. The selection highlighting helps direct my eyes' attention to the correct spot as I toggle back and forth to other running applications, answer the phone, papers on desk, etc. This has gotten more important with my aging eyes.

Of course, each time the active cell changes the operation has to be repeated. hmmm, maybe this could be worked into a macro: "on key", then select the row.
 
Try this from
Highlighting The Active Cell

If you want to make the active cell appear in a special color, use the following code in the Workbook_SheetSelectionChange event of the workbook.

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object,
ByVal Target As Excel.Range)
Static OldRange As Range
On Error Resume Next
Target.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.Interior.ColorIndex = xlColorIndexNone
Set OldRange = Target

End Sub

This will change the background color of the ActiveCell to yellow anytime you select a new cell, either with the mouse or with the arrow keys.
 
Try this macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Rows(ActiveCell.ROW).Select
End Sub

As the cell selection changes, its entire row is selected (gets the selection highlight).

I'm sure this can be customized so you can turn it on and off "at will".
 
Hi jelenko:

Here is one way using Conditional Formatting.

1) select all the rows
2) then invoke FORMAT|Conditional Formatting, and use ...
3) formula is ... =cell("row")=row()

this would highlite the row when you make or delete an entry; to automate highliting the row simply on selection, additionally use the following code ...
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Application.ScreenUpdating = True
End Sub




Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Are they looking to have the row highlight just when the mouse hovers over it, without actually *selecting* the cell?

Hg

Eng-Tips policies: faq731-376
 
clyde38. Thanks but I need the whole row highlighted.

TomBarsh. I tried this earlier but we were not able to change the cell contents that we were in.

Yogia. I need this to be active only on the current cell and on the whole row. Once moved to a different cell the previous cell and row should go back to normal.

HgTX. I only want the row where the cursor is and to move along with the cursor. I need to still be able to modify the contents of the cell that I am in.


 
jelenko,
Take a look at the link that I sent. Look at the RowLiner add in. This will accomplish what you want, even though the whole row is not highlighted. It actually will indicate the row and or column.
 
Clyde38:

I did go to the link. This looks exactly what I was looking for.

I will try it out tomorrow.

Many thanks to you,

Jelenko
 
Jelenko, FWIW, you should be able to edit the cell contents in the sample macro by pressing the F2 function key to activate the cell for editing.
 
Hi jelenko:
Yogia. I need this to be active only on the current cell and on the whole row. Once moved to a different cell the previous cell and row should go back to normal.
Have you actually tried the approach I suggested -- it does exactly what you have stated.


Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Yogi, That is pretty slick too! That could also be incorporated into a macro so that the manual part (steps 1, 2, and 3 of your original post) didn't need to be performed.
 
Hi Tom:

You are right -- but here is my reasoning ...

I have included the Conditional Formatting part because that alone will work on going to a new cell and on either making an entry, deleting a key, pressing F9 (meaning something to trigger screen update).

To fully automate so it will work passively simply on selecting a cell in another row, I included the Worksheet selection change event code.

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor