MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Apr 3rd, 2002, 01:50 PM   #1
Roni
Board Regular
 
Join Date: Apr 2002
Posts: 224
Default

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?
Roni is offline   Reply With Quote
Old Apr 3rd, 2002, 01:57 PM   #2
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

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 ]
daleyman is offline   Reply With Quote
Old Apr 3rd, 2002, 02:00 PM   #3
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

sorry, for yellow use the same but with:

.ColorIndex = 2
.Pattern = xlGray75
.PatternColorIndex = 19
daleyman is offline   Reply With Quote
Old Apr 3rd, 2002, 02:06 PM   #4
Roni
Board Regular
 
Join Date: Apr 2002
Posts: 224
Default

I'm not familiar with FREEZE PANES... can I get a little info... thanks.
Roni is offline   Reply With Quote
Old Apr 3rd, 2002, 02:14 PM   #5
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

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.
daleyman is offline   Reply With Quote
Old Apr 3rd, 2002, 02:17 PM   #6
Roni
Board Regular
 
Join Date: Apr 2002
Posts: 224
Default

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.
Roni is offline   Reply With Quote
Old Apr 3rd, 2002, 02:18 PM   #7
NateO
Legend
 
NateO's Avatar
 
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
Default

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, NateO

[ This Message was edited by: NateO on 2002-05-21 12:18 ]
NateO is offline   Reply With Quote
Old Apr 3rd, 2002, 02:26 PM   #8
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

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.
daleyman is offline   Reply With Quote
Old Apr 3rd, 2002, 02:33 PM   #9
NateO
Legend
 
NateO's Avatar
 
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
Default

Daley, I think the more mellow yellow is 36. Liked your code too.

Have a good one.
__________________
Regards,
Nate Oliver
Microsoft Excel MVP
Nate's Excel Blog
NateO is offline   Reply With Quote
Old May 22nd, 2002, 11:58 AM   #10
dennisdjones
New Member
 
Join Date: Apr 2002
Posts: 19
Default

To SEE HEADING, select cell below HEADING and FREEZE PANES from there. Will scroll both x and y axis.

dennisdjones
dennisdjones is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes