![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 224
|
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? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
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 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
sorry, for yellow use the same but with:
.ColorIndex = 2 .Pattern = xlGray75 .PatternColorIndex = 19 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Posts: 224
|
I'm not familiar with FREEZE PANES... can I get a little info... thanks.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
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. |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Posts: 224
|
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. |
|
|
|
|
|
#7 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
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 _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-05-21 12:18 ] |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
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. |
|
|
|
|
|
#9 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Daley, I think the more mellow yellow is 36. Liked your code too.
Have a good one. |
|
|
|
|
|
#10 |
|
New Member
Join Date: Apr 2002
Posts: 19
|
To SEE HEADING, select cell below HEADING and FREEZE PANES from there. Will scroll both x and y axis.
dennisdjones |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|