Naming cells sequentially

  • Thread starter Thread starter hdf
  • Start date Start date
H

hdf

Is there a way to easily name cells sequentially?

For example, if I want to name cell A1 "yr 1", A2 "yr 2", A3 "yr 3",
etc. Is there a way to do this without having to go cell by cell and
type in the name in the Name Box for each cell?

Thank you.
 
hdf,

You should be able to "Fill Down".
Type yr 1 into A1
Select Cell A1
Move your cursor to the little black box on the bottom rirght of the cell
(your cursor should turn into a "+")
Now hold down the left mouse button and drag down as far as
you need to.

John
 
hdf

Enter yr 1 in B1 then drag/copy down Column B as far as you wish to get yr 2,
yr 3, etc.

Now select column A and B to end of data in B

Insert>Name>Create> check "right column" only and OK

A1 is named yr_1
A2 is named yr_2

You can now Clear/delete contents of Column B.

Gord Dibben Excel MVP
 
Hi John,

I believe the OP referred to inserting a name for the each cell.
As far as I know he would need VBA for that, he could use
the list you created for him using something like

Sheet1.Range("A1").Name = Range("A1").Value

--

Regards,

Peo Sjoblom

John Wilson said:
hdf,

You should be able to "Fill Down".
Type yr 1 into A1
Select Cell A1
Move your cursor to the little black box on the bottom rirght of the cell
(your cursor should turn into a "+")
Now hold down the left mouse button and drag down as far as
you need to.

John
 
If however he wants to actually name the cells, as if using Insert / Name /
Define, then he can use your suggestion but in Col B.

With yr 1, yr 2, yr 3 in Col B down as far as his range goes, if he now selects
the entire range in A and B corresponding to those cells and does Insert / Name
/ Create and ticks 'Names in Right Column', then he will instantly create names
for each of the cells in Col A alone. NOTE though, that the names themselves
cannot have spaces and so spaces will be replaced with an underscore.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



John Wilson said:
hdf,

You should be able to "Fill Down".
Type yr 1 into A1
Select Cell A1
Move your cursor to the little black box on the bottom rirght of the cell
(your cursor should turn into a "+")
Now hold down the left mouse button and drag down as far as
you need to.

John
 
Peo,

Read the OP's post again and I see the error of my ways.
Thanks for keeping me honest.

John

Peo Sjoblom said:
Hi John,

I believe the OP referred to inserting a name for the each cell.
As far as I know he would need VBA for that, he could use
the list you created for him using something like

Sheet1.Range("A1").Name = Range("A1").Value
 
John, Gord, Peo and Ken:

Thank you for the quick reply. Just to clarify, Gord and Ken had th
answer I was looking for and it is greatly appreciated.

I can't tell you the amount of time you have saved me. Too bad I di
not know about this site several years ago. I might have saved mysel
ours of time and numerous errors.

Again, thanks to all of you.

Hecto
 
Thanks for the feedback, hdf.

Always nice to know what works or doesn't work for the OP.

Gord
 
Back
Top