ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Name a worksheet using a cell (https://www.excelbanter.com/excel-programming/339097-name-worksheet-using-cell.html)

ineedhelp2[_7_]

Name a worksheet using a cell
 

I want to name the tab in my worksheet based on what cell A1 says. I
this possible

--
ineedhelp
-----------------------------------------------------------------------
ineedhelp2's Profile: http://www.excelforum.com/member.php...fo&userid=2629
View this thread: http://www.excelforum.com/showthread.php?threadid=40159


[email protected]

Name a worksheet using a cell
 
activesheet.name= range("A1").Value


cht13er

Name a worksheet using a cell
 
Below is some code that you might find as being a bit more versatile.
What it will do is take cell contents from column 1 and create a new sheet
with that name .. in the correct order!

_!_!!_!_!_!__!_!_!_!_!_!_!_
Public Sub CreateSheetNamesFromList()

Dim Nayme As String
Dim K As Byte
K = 1

Range("a1").Select 'this is the first cell in List

Do Until ActiveCell.Value = "" 'Loop until a blank cell is encountered
Nayme = ActiveCell.Value
Sheets.Add
ActiveSheet.Name = Nayme
Sheets(Nayme).Move After:=Sheets(K + 1)
Sheets("List").Select
ActiveCell.Offset(1, 0).Select
K = K + 1
Loop

End Sub
!_!_!!_!_!_!_!_!_!_!_

--
Chris Togeretz
Ontario, Canada


"ineedhelp2" wrote:


I want to name the tab in my worksheet based on what cell A1 says. Is
this possible?


--
ineedhelp2
------------------------------------------------------------------------
ineedhelp2's Profile: http://www.excelforum.com/member.php...o&userid=26298
View this thread: http://www.excelforum.com/showthread...hreadid=401594




All times are GMT +1. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com