<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Naming a Sheet Based on a Cell</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jon von der Heyden</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-40093</link>
		<dc:creator>Jon von der Heyden</dc:creator>
		<pubDate>Wed, 01 Jul 2009 15:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-40093</guid>
		<description>&lt;p&gt;Last one, I promise...   I&#039;ve just discovered that this won&#039;t return False if attempting to name the sheet history.  That is it doesn&#039;t raise the error, so we have to catch this in the code too:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; ValidSheetName(strSheetName &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; strThisSheet &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; strThisSheet = ThisWorkbook.Sheets(1).Name&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; errHandler&lt;br&gt;
&#160; &#160; &#160; &#160; ThisWorkbook.Sheets(1).Name = strSheetName&lt;br&gt;
&#160; &#160; &#160; &#160; ValidSheetName = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; ThisWorkbook.Sheets(1).Name = strThisSheet&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; UCase(strSheetName) = &lt;span class=&quot;st0&quot;&gt;&quot;HISTORY$&quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; ValidSheetName = &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Exit&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; 0&lt;br&gt;
&lt;br&gt;
errHandler:&lt;br&gt;
&#160; &#160; &#160; &#160; ValidSheetName = &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Last one, I promise&#8230;   I&#8217;ve just discovered that this won&#8217;t return False if attempting to name the sheet history.  That is it doesn&#8217;t raise the error, so we have to catch this in the code too:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> ValidSheetName(strSheetName <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Boolean</span></p>
<p><span class="kw1">Dim</span> strThisSheet <span class="kw1">As</span> <span class="kw1">String</span></p>
<p>&nbsp; &nbsp; strThisSheet = ThisWorkbook.Sheets(1).Name</p>
<p>&nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">GoTo</span> errHandler<br />
&nbsp; &nbsp; &nbsp; &nbsp; ThisWorkbook.Sheets(1).Name = strSheetName<br />
&nbsp; &nbsp; &nbsp; &nbsp; ValidSheetName = <span class="kw1">True</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ThisWorkbook.Sheets(1).Name = strThisSheet<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> UCase(strSheetName) = <span class="st0">&#8220;HISTORY$&#8221;</span> <span class="kw1">Then</span> ValidSheetName = <span class="kw1">False</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Exit</span> <span class="kw1">Function</span><br />
&nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">GoTo</span> 0</p>
<p>errHandler:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ValidSheetName = <span class="kw1">False</span></p>
<p><span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon von der Heyden</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-40092</link>
		<dc:creator>Jon von der Heyden</dc:creator>
		<pubDate>Wed, 01 Jul 2009 13:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-40092</guid>
		<description>&lt;p&gt;My code above was a straight froward copy and paste. In my instance I always want the sheet name to be &#039;Control&#039;.  The code would be better if we were to simply restore the name.&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; ValidSheetName(strSheetName &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; strThisSheet &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; strThisSheet = ThisWorkbook.Sheets(1).Name&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; errHandler&lt;br&gt;
&#160; &#160; &#160; &#160; ThisWorkbook.Sheets(1).Name = strSheetName&lt;br&gt;
&#160; &#160; &#160; &#160; ValidSheetName = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; ThisWorkbook.Sheets(1).Name = strThisSheet&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Exit&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; 0&lt;br&gt;
&lt;br&gt;
errHandler:&lt;br&gt;
&#160; &#160; &#160; &#160; ValidSheetName = &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; testFunction()&lt;br&gt;
&lt;br&gt;
&#160; &#160; Debug.&lt;span class=&quot;kw1&quot;&gt;Print&lt;/span&gt; ValidSheetName(&lt;span class=&quot;st0&quot;&gt;&quot;NameOK&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; Debug.&lt;span class=&quot;kw1&quot;&gt;Print&lt;/span&gt; ValidSheetName(&lt;span class=&quot;st0&quot;&gt;&quot;NameNotOk/&quot;&lt;/span&gt;)&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>My code above was a straight froward copy and paste. In my instance I always want the sheet name to be &#8216;Control&#8217;.  The code would be better if we were to simply restore the name.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> ValidSheetName(strSheetName <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Boolean</span></p>
<p><span class="kw1">Dim</span> strThisSheet <span class="kw1">As</span> <span class="kw1">String</span></p>
<p>&nbsp; &nbsp; strThisSheet = ThisWorkbook.Sheets(1).Name</p>
<p>&nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">GoTo</span> errHandler<br />
&nbsp; &nbsp; &nbsp; &nbsp; ThisWorkbook.Sheets(1).Name = strSheetName<br />
&nbsp; &nbsp; &nbsp; &nbsp; ValidSheetName = <span class="kw1">True</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ThisWorkbook.Sheets(1).Name = strThisSheet<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Exit</span> <span class="kw1">Function</span><br />
&nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">GoTo</span> 0</p>
<p>errHandler:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ValidSheetName = <span class="kw1">False</span></p>
<p><span class="kw1">End</span> <span class="kw1">Function</span></p>
<p>
<span class="kw1">Sub</span> testFunction()</p>
<p>&nbsp; &nbsp; Debug.<span class="kw1">Print</span> ValidSheetName(<span class="st0">&#8220;NameOK&#8221;</span>)<br />
&nbsp; &nbsp; Debug.<span class="kw1">Print</span> ValidSheetName(<span class="st0">&#8220;NameNotOk/&#8221;</span>)</p>
<p><span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon von der Heyden</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-40091</link>
		<dc:creator>Jon von der Heyden</dc:creator>
		<pubDate>Wed, 01 Jul 2009 13:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-40091</guid>
		<description>&lt;p&gt;I realise this is quite old but I was browsing the web looking for a function to validate a sheet name.  I was thinking a complex regex pattern would be required but I finally settled on my own function.  This will work provided you do not intend on using the function at worksheet level...&lt;/p&gt;
&lt;p&gt;Function ValidSheetName(strSheetName As String) As Boolean&lt;br&gt;
    On Error GoTo errHandler&lt;br&gt;
        ThisWorkbook.Sheets(1).Name = strSheetName&lt;br&gt;
        ValidSheetName = True&lt;br&gt;
        ThisWorkbook.Sheets(1).Name = &quot;Control&quot;&lt;br&gt;
        Exit Function&lt;br&gt;
    On Error GoTo 0&lt;br&gt;
errHandler:&lt;br&gt;
        ValidSheetName = False&lt;br&gt;
End Function&lt;/p&gt;
&lt;p&gt;Sub testFunction()&lt;br&gt;
    Debug.Print ValidSheetName(&quot;NameOK&quot;)&lt;br&gt;
    Debug.Print ValidSheetName(&quot;NameNotOk/&quot;)&lt;br&gt;
End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I realise this is quite old but I was browsing the web looking for a function to validate a sheet name.  I was thinking a complex regex pattern would be required but I finally settled on my own function.  This will work provided you do not intend on using the function at worksheet level&#8230;</p>
<p>Function ValidSheetName(strSheetName As String) As Boolean<br />
    On Error GoTo errHandler<br />
        ThisWorkbook.Sheets(1).Name = strSheetName<br />
        ValidSheetName = True<br />
        ThisWorkbook.Sheets(1).Name = &#8220;Control&#8221;<br />
        Exit Function<br />
    On Error GoTo 0<br />
errHandler:<br />
        ValidSheetName = False<br />
End Function</p>
<p>Sub testFunction()<br />
    Debug.Print ValidSheetName(&#8220;NameOK&#8221;)<br />
    Debug.Print ValidSheetName(&#8220;NameNotOk/&#8221;)<br />
End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-37536</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Sun, 25 Jan 2009 19:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-37536</guid>
		<description>&lt;p&gt;Excel sheets are limited to 31 characters, so I changed the last line of the cleaner to&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container text default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;text codecolorer&quot;&gt;CleanSheetName = Left$(sTemp, 31)&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Excel sheets are limited to 31 characters, so I changed the last line of the cleaner to</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">CleanSheetName = Left$(sTemp, 31)</div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-36502</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 16 Dec 2008 23:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-36502</guid>
		<description>&lt;p&gt;Hello, the information was rather useful but I needed a solution that would A) clear the old cell names before hand (preventing the previously existing name error) as well as use dated naming format (JUN 27 for example). I&#039;ve included the code below that needs to be added to do such a thing in case others need this as well (in my case, I was automating segments of time sheets and payroll to update each other).&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;co1&quot;&gt;&#039;this replaces the date format assignment&lt;br&gt;
&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;Const&lt;/span&gt; sDATEFORM &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&quot;dd-mm-yyyy&quot;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;this goes towards the top in declarations&lt;br&gt;
&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; monthArray(0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 11) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(0) = &lt;span class=&quot;st0&quot;&gt;&quot;Jan&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(1) = &lt;span class=&quot;st0&quot;&gt;&quot;Feb&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(2) = &lt;span class=&quot;st0&quot;&gt;&quot;Mar&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(3) = &lt;span class=&quot;st0&quot;&gt;&quot;Apr&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(4) = &lt;span class=&quot;st0&quot;&gt;&quot;May&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(5) = &lt;span class=&quot;st0&quot;&gt;&quot;Jun&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(6) = &lt;span class=&quot;st0&quot;&gt;&quot;Jul&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(7) = &lt;span class=&quot;st0&quot;&gt;&quot;Aug&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(8) = &lt;span class=&quot;st0&quot;&gt;&quot;Sep&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(9) = &lt;span class=&quot;st0&quot;&gt;&quot;Oct&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(10) = &lt;span class=&quot;st0&quot;&gt;&quot;Nov&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; monthArray(11) = &lt;span class=&quot;st0&quot;&gt;&quot;Dec&quot;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;this goes before the assignment but after the formatting of the date&lt;br&gt;
&lt;/span&gt; &#160; &#160; &#160; &#160; &#160; &#160;&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; tmpStr() &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; tmpStr = Split(sNewName, &lt;span class=&quot;st0&quot;&gt;&quot;-&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; sNewName = monthArray(tmpStr(1) - 1) + &lt;span class=&quot;st0&quot;&gt;&quot; &quot;&lt;/span&gt; + tmpStr(0)&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;For those that might do what we do (store payroll dates on the first sheet, and have data on each following sheet page that represent biweekly time sheet totals and dates) this might be handy.&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; Workbook_SheetStuffUpdate()&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160;&lt;span class=&quot;co1&quot;&gt;&#039;rename all 28 sheets to a generic unique name that we know won&#039;t exist&lt;br&gt;
&lt;/span&gt; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 26&lt;br&gt;
&#160; &#160; &#160; &#160; Sheets(i + 2).Name = Sheets(i + 2).Name + &lt;span class=&quot;st0&quot;&gt;&quot;dave&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160;&lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160;&lt;span class=&quot;co1&quot;&gt;&#039;Assign data from the first sheet to all the following sheets, this is based&lt;br&gt;
&lt;/span&gt; &#160; &lt;span class=&quot;co1&quot;&gt;&#039;on code provided above by Dick Kusleika (thanks!)&lt;br&gt;
&lt;/span&gt; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 26&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Sheets(i + 2).Cells(23, 9).Value = Sheets(1).Cells((i + 8), 2).Value&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Sheets(i + 2).Cells(7, 9).Value = Sheets(1).Cells((i + 8), 1).Value&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;As I said before, I based this partially on what I found here, and don&#039;t want anyone to think I&#039;m trying to take credit for anything (what little credit there is for such simple code).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello, the information was rather useful but I needed a solution that would A) clear the old cell names before hand (preventing the previously existing name error) as well as use dated naming format (JUN 27 for example). I&#8217;ve included the code below that needs to be added to do such a thing in case others need this as well (in my case, I was automating segments of time sheets and payroll to update each other).</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="co1">&#8216;this replaces the date format assignment<br />
</span><span class="kw1">Const</span> sDATEFORM <span class="kw1">As</span> <span class="kw1">String</span> = <span class="st0">&#8220;dd-mm-yyyy&#8221;</span></p>
<p><span class="co1">&#8216;this goes towards the top in declarations<br />
</span><span class="kw1">Dim</span> monthArray(0 <span class="kw1">To</span> 11) <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(0) = <span class="st0">&#8220;Jan&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(1) = <span class="st0">&#8220;Feb&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(2) = <span class="st0">&#8220;Mar&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(3) = <span class="st0">&#8220;Apr&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(4) = <span class="st0">&#8220;May&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(5) = <span class="st0">&#8220;Jun&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(6) = <span class="st0">&#8220;Jul&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(7) = <span class="st0">&#8220;Aug&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(8) = <span class="st0">&#8220;Sep&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(9) = <span class="st0">&#8220;Oct&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(10) = <span class="st0">&#8220;Nov&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; monthArray(11) = <span class="st0">&#8220;Dec&#8221;</span></p>
<p><span class="co1">&#8216;this goes before the assignment but after the formatting of the date<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">Dim</span> tmpStr() <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpStr = Split(sNewName, <span class="st0">&#8220;-&#8221;</span>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sNewName = monthArray(tmpStr(1) &#8211; 1) + <span class="st0">&#8221; &#8220;</span> + tmpStr(0)</div>
</div>
<p>For those that might do what we do (store payroll dates on the first sheet, and have data on each following sheet page that represent biweekly time sheet totals and dates) this might be handy.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Sub</span> Workbook_SheetStuffUpdate()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Dim</span> i <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp;<span class="co1">&#8216;rename all 28 sheets to a generic unique name that we know won&#8217;t exist<br />
</span> &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 26<br />
&nbsp; &nbsp; &nbsp; &nbsp; Sheets(i + 2).Name = Sheets(i + 2).Name + <span class="st0">&#8220;dave&#8221;</span><br />
&nbsp; &nbsp;<span class="kw1">Next</span> i<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp;<span class="co1">&#8216;Assign data from the first sheet to all the following sheets, this is based<br />
</span> &nbsp; <span class="co1">&#8216;on code provided above by Dick Kusleika (thanks!)<br />
</span> &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 26<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sheets(i + 2).Cells(23, 9).Value = Sheets(1).Cells((i + 8), 2).Value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sheets(i + 2).Cells(7, 9).Value = Sheets(1).Cells((i + 8), 1).Value<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i<br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
<p>As I said before, I based this partially on what I found here, and don&#8217;t want anyone to think I&#8217;m trying to take credit for anything (what little credit there is for such simple code).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-36302</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Fri, 05 Dec 2008 23:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-36302</guid>
		<description>&lt;p&gt;Rochelle:  The basics would look like this:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; MakeSheetNames()&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 2&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; ThisWorkbook&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Sheets(i + 2).Name = .Sheets(1).Range(&lt;span class=&quot;st0&quot;&gt;&quot;A1&quot;&lt;/span&gt;).Offset(i, 0).Value&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&#160; &#160; &lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Rochelle:  The basics would look like this:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Sub</span> MakeSheetNames()<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">Dim</span> i <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">With</span> ThisWorkbook<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sheets(i + 2).Name = .Sheets(1).Range(<span class="st0">&#8220;A1&#8243;</span>).Offset(i, 0).Value<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">With</span><br />
&nbsp; &nbsp; <span class="kw1">Next</span> i<br />
&nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rochelle Walker, Sr.</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-36025</link>
		<dc:creator>Rochelle Walker, Sr.</dc:creator>
		<pubDate>Tue, 11 Nov 2008 01:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-36025</guid>
		<description>&lt;p&gt;All this is great, but I need to rename worksheet tab names by referencing different cells in another worksheet within the same workbook. In other words, I have Sheet1 with data in cells A1, A2, A3, etc. I want the data in A1 to be the name of Sheet2, the data in A2 to be the name of Sheet3, the data in A3 to be the name of Sheet4, etc. Please help.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>All this is great, but I need to rename worksheet tab names by referencing different cells in another worksheet within the same workbook. In other words, I have Sheet1 with data in cells A1, A2, A3, etc. I want the data in A1 to be the name of Sheet2, the data in A2 to be the name of Sheet3, the data in A3 to be the name of Sheet4, etc. Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-34890</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Fri, 26 Sep 2008 02:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-34890</guid>
		<description>&lt;p&gt;Hi, I am new to VBA as well and i need something slightly different.&lt;/p&gt;
&lt;p&gt;Instead of naming a sheet based on a cell, i need to call out a sheet from a workbook based on a cell input.&lt;/p&gt;
&lt;p&gt;please help&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, I am new to VBA as well and i need something slightly different.</p>
<p>Instead of naming a sheet based on a cell, i need to call out a sheet from a workbook based on a cell input.</p>
<p>please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-34803</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-34803</guid>
		<description>&lt;p&gt;Hi, Using an activex form control to change the content of the cell.  This doesn&#039;t trigger the thisworkbook sheetchange ... ?  Can confirm it works if the cell is changed manually.&lt;br&gt;
Jason&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, Using an activex form control to change the content of the cell.  This doesn&#8217;t trigger the thisworkbook sheetchange &#8230; ?  Can confirm it works if the cell is changed manually.<br />
Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/01/04/naming-a-sheet-based-on-a-cell/#comment-34631</link>
		<dc:creator>Kelly</dc:creator>
		<pubDate>Wed, 03 Sep 2008 07:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=965#comment-34631</guid>
		<description>&lt;p&gt;I am new to VBA like Macutan - so I really appreciated the way you broke it down and said where to put the sub and function.&lt;br&gt;
I am creating different tabs for each month so I just adjusted how the program displays dates and it worked like a charm. Beautiful and thanks :D&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am new to VBA like Macutan &#8211; so I really appreciated the way you broke it down and said where to put the sub and function.<br />
I am creating different tabs for each month so I just adjusted how the program displays dates and it worked like a charm. Beautiful and thanks <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

