Highlight CURRENT row

Roni

Board Regular
Joined
Apr 2, 2002
Messages
231
I have a tremendously long spreadsheet and have to enter information in many columns pertaining to the information in the first two columns. Sometimes I can not tell if I'm on the correct row... so what I'd like to be able to to is...

Whatever row my cursor is currently in, I would like that entire row to highlight itself. (Perferably in a yellow highlight format). Is this something I can do in Excel?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
copy this code onto the module relating to the sheet you want it to operate on...

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

With Target.EntireRow.Interior
.ColorIndex = 37
.Pattern = xlGray25
.PatternColorIndex = 24
End With
End Sub



...otherwise, i've never needed to do this, i suggest if you don't already know how to take advantage of FREEZE PANES in the WINDOW menu, then you start playing with it, it will probably help you out without you needing any code solution.
This message was edited by daleyman on 2002-04-03 12:58
 
Upvote 0
sorry, for yellow use the same but with:

.ColorIndex = 2
.Pattern = xlGray75
.PatternColorIndex = 19
 
Upvote 0
oh, you'll love it then

go to a cell in your huge list, say, cell F2 to freeze columns A-D and row 1, then go to the window menu and select freeze panes.

D.
 
Upvote 0
I tried the FREEZE PANES, just before I got your last post. Awesome. However, I was only able to freeze a horizontal row (which is a big help, b/c that was another of my issues, I can't see the heading as I get further down in the sheet). However, I don't see how to use FREEZE PANES for the columns (or IF I can even freeze in both directions).

Also, about the aforementioned code... I copied it to a module... but nothing. I am assuming I then run a macro, but it's not there. Can I get a little more help. Thanks.
 
Upvote 0
Actually, I think yellow is 6, at least in xl2000. I skinned this cat a little differently, similar result:

Code:
Private n As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error GoTo 1
n.EntireRow.Interior.ColorIndex = xlNone
target.EntireRow.Interior.ColorIndex = 6
1: Set n = Selection
End Sub

As in the previous post, you need to right-click on the worksheet tab in question, select "view code" and paste the macro in the module that should appear (worksheet module).

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
This message was edited by NateO on 2002-05-21 12:18
 
Upvote 0
Roni > goto same menu and do unfreeze panes, then try again from a different cell. play with it.

NateO > yeah, nice, just don't like bold colours and went for a pastel shade, ha ha.
 
Upvote 0
Daley, I think the more mellow yellow is 36. Liked your code too.

Have a good one.
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,194
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top