Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default naming several sheets from cell range

I know how to make a single sheet tab name equal a value in one cell, but
how do I do multiple cells at once?

I have a range, cells a1:a50 named 'ATeam'. All fifty cells contain text
data or just the value "0" zero. The range is already sorted in ascending
order with any zero value cells at the bottom of the range. I want to run a
macro that takes that range, and creates a new workbook with sheet names
equal to each cell value in that range (except the cells that = 0).

I was going to highlight the range, count the cells that contain text, use
that value in a loop with Activecell and offset to move down the range from
top to bottom creating new sheets... but I can't seem to count the number of
cells in the range that equal text to get the loop to value.

Any ideas?

Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default naming several sheets from cell range

Sub sheeter()
For i = 1 To 50
v = Sheets("Sheet1").Cells(i, "A").Value
If v < 0 Then
Sheets.Add.Name = v
End If
Next
End Sub
--
Gary's Student
gsnu200704


"gifer" wrote:

I know how to make a single sheet tab name equal a value in one cell, but
how do I do multiple cells at once?

I have a range, cells a1:a50 named 'ATeam'. All fifty cells contain text
data or just the value "0" zero. The range is already sorted in ascending
order with any zero value cells at the bottom of the range. I want to run a
macro that takes that range, and creates a new workbook with sheet names
equal to each cell value in that range (except the cells that = 0).

I was going to highlight the range, count the cells that contain text, use
that value in a loop with Activecell and offset to move down the range from
top to bottom creating new sheets... but I can't seem to count the number of
cells in the range that equal text to get the loop to value.

Any ideas?

Thanks,



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 sheets after a range kefee85 Excel Discussion (Misc queries) 3 October 13th 09 09:51 PM
Naming sheets from a cell value Tony4X4 Excel Discussion (Misc queries) 12 September 7th 09 01:55 PM
Naming sheets by cell content kefee85 Excel Discussion (Misc queries) 1 March 5th 09 09:31 PM
Naming Sheets using a range in another worksheet gazza Excel Worksheet Functions 3 September 19th 06 01:02 PM
Range Naming using cell data Ronny Hamida[_2_] Excel Programming 3 May 27th 04 06:06 PM


All times are GMT +1. The time now is 12:26 AM.

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

About Us

"It's about Microsoft Excel"