Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default naming tabs from cells on diff sheet

I have 71 worksheets, on sheet 1 in column B from B4 there are 70
names in cells, how do I get the name onto the tabs for the next 70
sheets. Plus on each sheet in D1 the name appear as well,
I may have to make 2 workbooks instead of having 71 worksheets in 1
workbook to make it easier. I have posted a similar request before but
I still have trouble with it. Could someone please help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default naming tabs from cells on diff sheet

This little macro assumes that the first sheet is named "directory", adjust
to suite:

Sub name_um()
Dim shnames(100) As String
Sheets("directory").Activate
For i = 0 To 69
shnames(i) = Cells(i + 4, "B").Value
Next
For i = 2 To 71
Worksheets(i).Name = shnames(i - 2)
Next
End Sub
--
Gary''s Student - gsnu2007c


"duckie" wrote:

I have 71 worksheets, on sheet 1 in column B from B4 there are 70
names in cells, how do I get the name onto the tabs for the next 70
sheets. Plus on each sheet in D1 the name appear as well,
I may have to make 2 workbooks instead of having 71 worksheets in 1
workbook to make it easier. I have posted a similar request before but
I still have trouble with it. Could someone please help

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default naming tabs from cells on diff sheet

I'm not sure what you meant by Sheet 1. Here are two example that should
help. One case Sheet1 is the index to the sheet and the other is the string
name of the sheet. You need to have the code skip the first sheet.

For Each sht In ThisWorkbook.Sheets

If sht.Index < 1 Then
sht.Name = sht.Range("D1")
End If
Next sht
End Sub

For Each sht In ThisWorkbook.Sheets

If sht.Name < "Sheet1" Then
sht.Name = sht.Range("D1")
End If
Next sht
End Sub


"duckie" wrote:

I have 71 worksheets, on sheet 1 in column B from B4 there are 70
names in cells, how do I get the name onto the tabs for the next 70
sheets. Plus on each sheet in D1 the name appear as well,
I may have to make 2 workbooks instead of having 71 worksheets in 1
workbook to make it easier. I have posted a similar request before but
I still have trouble with it. Could someone please help

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default naming tabs from cells on diff sheet

Hi,

This will help you get the sheet names in which ever cell you want.
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
But to get the names on the sheet i think you should type them by right
clicking on the sheet tab.
http://www.xldynamic.com/source/xld.xlFAQ0002.html
--
Thanks
Suleman Peerzade


"duckie" wrote:

I have 71 worksheets, on sheet 1 in column B from B4 there are 70
names in cells, how do I get the name onto the tabs for the next 70
sheets. Plus on each sheet in D1 the name appear as well,
I may have to make 2 workbooks instead of having 71 worksheets in 1
workbook to make it easier. I have posted a similar request before but
I still have trouble with it. Could someone please help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
naming tabs steve Excel Worksheet Functions 2 December 1st 07 08:15 PM
Naming tabs Mike Excel Worksheet Functions 5 November 27th 07 05:04 PM
Naming Tabs ebro Excel Discussion (Misc queries) 3 July 13th 06 11:07 PM
naming tabs Jeff Excel Worksheet Functions 8 February 6th 06 04:41 AM
VBA to Pull info from 2 diff tabs from the same spreadsheet mike Excel Discussion (Misc queries) 0 December 7th 05 06:41 PM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"