Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Rename Columns?

Status
Not open for further replies.

castout

Programmer
Jan 22, 2002
23
US
Is there a way to rename the columns in Excel so you see the name instead of A,B,C,etc.? I want to be able to refer to them by name in VBA.
 
Well, I have several worksheets. I want each column to have the same name from one worksheet to the next, but I want to be able to refer to each sheet's column individually. Will that work? Also, will the name of the range show up instead of the column letters ("A", "B",...)?
 
castout,
no the named range won't show up instead of "a" "b" ...
but to if you need to see it then in row 1 for each column just put in the name you want.
then you just neeed to call your range when needed:
Worksheets(1).Range("yournamedrange1").
Worksheets(2).Range("yournamedrange2").
check the help for 'name' for more in depth info.
regards,
longhair
 
Hi,

How can I rename a table as it changes size faq68-1331

Ranges on separate sheets can have the same name. However, The FIRST range definition can be referenced workbook-wide by the name alone. Each subsequent range that is so like named, needs the Sheet name along with the range name to reference it.

Skip,

[glasses] [red]Be advised:[/red]We know Newton's 3 Laws. But did you hear about the [red]FOURTH???[/red]
Only ONE fig per cookie![tongue]
 
Thanks for your help!
Sorry if I'm being dense, but I can't get this to work. I can't get it to let me rename the "A" column on every sheet the same name - like "Status" for example. And if I could, I wouldn't be able to select only the "Status" range for Sheet1 - wouldn't it select that column for all sheets?
 
castout,
from skip in another thread:
Insert/name/create - create name in TOP row. This names the ranges for your data
make sure that row 1 has the name you want for each column.
or you could highlight your data and in the named range drop down (usually top left hand corner) type in your name.
the drop down normally contains your cell position.
hth
regards,
longhair
 

In the case of

Insert/Name/Create

ALL CONTIGUOUS DATA should be selected


In the case of using the NAME BOX

only EACH INDIVIDUAL RANGE OF DATA should be selected.

Skip,

[glasses] [red]Be advised:[/red]We know Newton's 3 Laws. But did you hear about the [red]FOURTH???[/red]
Only ONE fig per cookie![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top