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 20th, 2002, 02:05 PM   #1
Spencer Larkin
New Member
 
Join Date: Apr 2002
Posts: 1
Default

Can I rename the column normal names A,B,C,D etc., into words of my choice ? - or

If I have a datasheet with tons of rows, how can I name the column headings so they always stay at the top row (visible) no matter how far down I scroll on the screen ?
Spencer Larkin is offline   Reply With Quote
Old Apr 20th, 2002, 02:09 PM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default


If I have a datasheet with tons of rows, how can I name the column headings so they always stay at the top row (visible) no matter how far down I scroll on the screen ?


Try:

Window|Freeze Panes

from the Menu bar.
Aladin Akyurek is offline   Reply With Quote
Old Apr 20th, 2002, 02:15 PM   #3
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-04-20 13:05, Spencer Larkin wrote:
Can I rename the column normal names A,B,C,D etc., into words of my choice ? - or

If I have a datasheet with tons of rows, how can I name the column headings so they always stay at the top row (visible) no matter how far down I scroll on the screen ?
See the Excel Help Index topic for "Keep row and column labels visible as you scroll".
Mark W. is offline   Reply With Quote
Old Apr 20th, 2002, 03:54 PM   #4
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,064
Default

Can I rename the column normal names A,B,C,D etc., into words of my choice ?

No Excel does not allow rename of defaut col A B C or ROWS 1 2 3 but will change in tools options to R1C1 or R1C2 etc... But use row 1 to hane headers to A1 = Jacks Data A2 = Date

The follow advice posted above this is common and exceptable,.,,, freeze panes... sounds good as said.

_________________
If you can help a guy in trouble -
If you can sort that nagging problem -
Pease try, in home, atwork or on a message board.

Others help you!
So PLEASE help if you can - If only the once.

Thank you -

Rdgs
=======

[ This Message was edited by: Jack in the UK on 2002-04-20 16:01 ]
Jack in the UK is offline   Reply With Quote
Old Apr 20th, 2002, 04:31 PM   #5
Ivan F Moala
MrExcel MVP
 
Ivan F Moala's Avatar
 
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
Default

1) Tools > Options >View
Deselect Row & column headings
2) Put your new names @ top
3) Freez pane
4) VBA Editor > select sheet > properties
5) Set scroll area to B2:IV65536
setting the scroll area so that the user cannot get to the Titles

You now have your own column titles
Note: The column headings have been left in
in this example to show how it really looks
and the positions;


ABCDE
1
Test1Test2Test3Test4
21



32



43



54



65



76



87



98



109



1110



1211




12








_________________
Kind Regards,
Ivan F Moala
http://www.gwds.co.nz/excel_files.html - Under Constru

[ This Message was edited by: Ivan F Moala on 2002-04-20 15:33 ]
Ivan F Moala is offline   Reply With Quote
Old Jul 1st, 2005, 01:19 AM   #6
Joe Was
MrExcel MVP
 
Joe Was's Avatar
 
Join Date: Feb 2002
Location: Central Florida, USA
Posts: 7,541
Default

Add this code to the "ThisWorkbook" module!
If you select Sheet1 the code erases Excel's Row and Column Headers and replaces them with custom Headers. If you select any other Sheet, Excel's normal Headers apear.

Note: You must reference each cell in Code or Formula by Normal Cell References, even if you have the custom ones in place!
When using this code, the Sheet with the custom headers must not use or reference: Row:1 or Column: A.

The code is automatic.
Note: The "Set" Ranges should be set to the number of Row and Columns you will be needing as to do the whole sheet as in the commented out "Set" statements in the code below will make the code take a long time to relabel all those rows!

The second Sub will return "Sheet1" to normal, until another Sheet is selected and you return to Sheet1!

To see how this works just copy the code below to the "ThisWorkbook" module in a default Workbook!


Private Sub Workbook_SheetActivate(ByVal Sh As Object)
'ThisWorkbook code!
Dim c&, r&

If Sh.Name = "Sheet1" Then
ActiveWindow.DisplayHeadings = False

'Set myColRng = Sheets("Sheet1").Range("B1:IV1")
Set myColRng = Sheets("Sheet1").Range("B1:AA1")
For Each Cellc In myColRng
c = c + 1
Cellc.Value = "Column: " & c
Next Cellc

'Set myRowRng = Sheets("Sheet1").Range("A2:A65536")
Set myRowRng = Sheets("Sheet1").Range("A2:A120")
For Each Cellr In myRowRng
r = r + 1
Cellr.Value = "Row: " & r
Next Cellr

Sheets("Sheet1").Cells.Select
Selection.Columns.AutoFit
Selection.Rows.AutoFit

Columns("A:A").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlInsideHorizontal).Weight = xlThin
Selection.Interior.ColorIndex = 34

Rows("1:1").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlInsideVertical).Weight = xlThin
Selection.Interior.ColorIndex = 34
Sheets("Sheet1").Range("A1").Select

Else
ActiveWindow.DisplayHeadings = True
End If
End Sub

Sub reSetHeaders()
ActiveWindow.DisplayHeadings = True
Sheets("Sheet1").Columns("A:A").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Selection.ClearContents

Sheets("Sheet1").Rows("1:1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Selection.ClearContents
Sheets("Sheet1").Range("A1").Select
End Sub
__________________
JSW: Try and try again: "The way of the Coder!"
Joe Was is offline   Reply With Quote
Old Jul 1st, 2005, 11:15 AM   #7
Joe Was
MrExcel MVP
 
Joe Was's Avatar
 
Join Date: Feb 2002
Location: Central Florida, USA
Posts: 7,541
Default

See the post above for all information!
The only change in the code below is an adjustment to the label counters, they now match the actual Row & Column headers in placement.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
'ThisWorkbook code!
Dim c&, r&

If Sh.Name = "Sheet1" Then
ActiveWindow.DisplayHeadings = False

'Set myColRng = Sheets("Sheet1").Range("B1:IV1")
Set myColRng = Sheets("Sheet1").Range("B1:AA1")
c = 1
For Each Cellc In myColRng
c = c + 1
Cellc.Value = "Column: " & c
Next Cellc

'Set myRowRng = Sheets("Sheet1").Range("A2:A65536")
Set myRowRng = Sheets("Sheet1").Range("A2:A120")
r = 1
For Each Cellr In myRowRng
r = r + 1
Cellr.Value = "Row: " & r
Next Cellr

Sheets("Sheet1").Cells.Select
Selection.Columns.AutoFit
Selection.Rows.AutoFit

Columns("A:A").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlInsideHorizontal).Weight = xlThin
Selection.Interior.ColorIndex = 34

Rows("1:1").Select
Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlInsideVertical).Weight = xlThin
Selection.Interior.ColorIndex = 34
Sheets("Sheet1").Range("A1").Select

Else
ActiveWindow.DisplayHeadings = True
End If
End Sub

Sub reSetHeaders()
ActiveWindow.DisplayHeadings = True
Sheets("Sheet1").Columns("A:A").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Selection.ClearContents

Sheets("Sheet1").Rows("1:1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Selection.ClearContents
Sheets("Sheet1").Range("A1").Select
End Sub
__________________
JSW: Try and try again: "The way of the Coder!"
Joe Was 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 06:31 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