Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Naming sheets after a range | Excel Discussion (Misc queries) | |||
Naming sheets from a cell value | Excel Discussion (Misc queries) | |||
Naming sheets by cell content | Excel Discussion (Misc queries) | |||
Naming Sheets using a range in another worksheet | Excel Worksheet Functions | |||
Range Naming using cell data | Excel Programming |