Name a bunch of cells each a unique sequential name

UncleBajubjubs

Board Regular
Joined
Jul 11, 2017
Messages
111
Office Version
  1. 2010
Good morning,
Is there a quick way to name a set of set each with its unique name? I have a column of cells, and I want cell A1 to be named "Import1", cell A2 to be named "Import2", etc. Is there a way to do this automatically, or will I have to manually name each cell?
Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try this:
Code:
Sub Name_Me()
'Modified 8/6/2019 10:27:33 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim count As Long
count = InputBox("How Many Rows")
    For i = 1 To count
        Cells(i, 1).Name = "Import" & i
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Try this:
Code:
Sub Name_Me()
'Modified 8/6/2019 10:27:33 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim count As Long
count = InputBox("How Many Rows")
    For i = 1 To count
        Cells(i, 1).Name = "Import" & i
    Next
Application.ScreenUpdating = True
End Sub


Thanks, that worked great!

I also have a corresponding table which will need similarly numbered named, like "Link1" "Link2", etc., however this column has cell BK6 as the first cell, so I'm not sure that best way to modify the original code.
 
Upvote 0
Try this for Link:

Code:
Sub Name_Me_Link()
'Modified  8/6/2019  11:06:41 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim count As Long
count = InputBox("How Many Rows")
    For i = 6 To count + 5
        Cells(i, "BK").Name = "Link" & i - 5
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Try this for Link:

Code:
Sub Name_Me_Link()
'Modified  8/6/2019  11:06:41 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim count As Long
count = InputBox("How Many Rows")
    For i = 6 To count + 5
        Cells(i, "BK").Name = "Link" & i - 5
    Next
Application.ScreenUpdating = True
End Sub

Worked perfectly, thanks!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top