<?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: INDIRECT and Dynamic Ranges</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Daniel Hur</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-65367</link>
		<dc:creator>Daniel Hur</dc:creator>
		<pubDate>Mon, 01 Aug 2011 21:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-65367</guid>
		<description>&lt;p&gt;Best solution to the INDIRECT(dynamic named function) problem I&#039;ve found. Simple, elegant, powerful. Thank you for fixing something the Redmond boys &amp; girls left woefully hobbled.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Best solution to the INDIRECT(dynamic named function) problem I&#8217;ve found. Simple, elegant, powerful. Thank you for fixing something the Redmond boys &amp; girls left woefully hobbled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Weir</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64588</link>
		<dc:creator>Jeff Weir</dc:creator>
		<pubDate>Wed, 08 Jun 2011 03:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64588</guid>
		<description>&lt;p&gt;@Dick, Rick: Comments is another well-documented example. From Walkenbach&#039;s Power Programming with VBA:&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;&#160;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; ModifyComment (Cell &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, Cmt &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;
Cell.Comment.Text Cmt&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; Funciton&lt;br&gt;
&lt;br&gt;
=ModifyComment(A1, &lt;span class=&quot;st0&quot;&gt;&quot;Hey, I changed your comment&quot;&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>@Dick, Rick: Comments is another well-documented example. From Walkenbach&#8217;s Power Programming with VBA:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer">&nbsp;<span class="kw1">Function</span> ModifyComment (Cell <span class="kw1">As</span> Range, Cmt <span class="kw1">As</span> <span class="kw1">String</span>)<br />
Cell.Comment.Text Cmt<br />
<span class="kw1">End</span> Funciton</p>
<p>=ModifyComment(A1, <span class="st0">&#8220;Hey, I changed your comment&#8221;</span>)</div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64579</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 07 Jun 2011 17:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64579</guid>
		<description>&lt;p&gt;@Dick,&lt;/p&gt;
&lt;p&gt;I think trying to get a list would be a good idea as it might give us some extra insight into how Excel works. Of course, like your example (which does work, by the way), there may be no practical use for them. I mean, yes, entering the UDF you posted causes the shape to move, but to move it again you would have to re-execute the UDF or a cell that references it... not much useful control there, but interesting all the same.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Dick,</p>
<p>I think trying to get a list would be a good idea as it might give us some extra insight into how Excel works. Of course, like your example (which does work, by the way), there may be no practical use for them. I mean, yes, entering the UDF you posted causes the shape to move, but to move it again you would have to re-execute the UDF or a cell that references it&#8230; not much useful control there, but interesting all the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64574</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Tue, 07 Jun 2011 13:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64574</guid>
		<description>&lt;p&gt;I know one exception is that you can manipulate shapes&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; xtest(rng &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; rng.Parent.Shapes(1).Left = rng.Parent.Shapes(1).Left + 30&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;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I don&#039;t remember the others (if I ever knew them).  Maybe I should create a post and see if we can get a list.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I know one exception is that you can manipulate shapes</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> xtest(rng <span class="kw1">As</span> Range)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; rng.Parent.Shapes(1).Left = rng.Parent.Shapes(1).Left + 30<br />
&nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>I don&#8217;t remember the others (if I ever knew them).  Maybe I should create a post and see if we can get a list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64571</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 07 Jun 2011 01:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64571</guid>
		<description>&lt;p&gt;@Dick, you are correct, cell functions are confined to changing the value of the cell, and are not permitted to change the cell&#039;s format, or do anything outside the cell.  &lt;/p&gt;
&lt;p&gt;I just wanted to post how I finally SOLVED this problem with a slick workaround by not using offset() function in my dynamic named range.  I ended up making the ranges dynamic with a nifty worksheet macro.  The code seems long, but that&#039;s because of some defensive coding, without it, the whole thing is about 10 lines.  Here is my spread sheet.&lt;/p&gt;
&lt;p&gt;A   B   C   D&lt;br&gt;
---------&lt;br&gt;
x   y   z   a&lt;br&gt;
b   c       q&lt;br&gt;
n           m&lt;br&gt;
            p&lt;/p&gt;
&lt;p&gt;So I have named range that goes across the top row - call it &quot;IndustryCategories&quot;, and the lower elements as my subcategories.  This works with multiple lists on the same sheet (as long as their not touching).  And it allows the user to simply add more subcategories as they please.  The worksheet sub is as follows:&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;Private Sub Worksheet_Change(ByVal Target As Range)&lt;br&gt;
&lt;br&gt;
DynamicHLookup (&quot;IndustryCategories&quot;)&lt;br&gt;
DynamicHLookup (&quot;SkillCategories&quot;)&lt;br&gt;
&lt;br&gt;
End Sub&lt;br&gt;
&lt;br&gt;
Private Sub DynamicHLookup(range_name As String)&lt;br&gt;
&lt;br&gt;
Set rngA = Range(range_name)&lt;br&gt;
Dim rng As Range&lt;br&gt;
Dim N, i As Integer&lt;br&gt;
Dim name1 As String&lt;br&gt;
&lt;br&gt;
For N = 1 To rngA.Columns.Count&lt;br&gt;
&lt;br&gt;
&#039;Define rng as top row cell, Category name&lt;br&gt;
&lt;br&gt;
&#160; &#160; Set rng = rngA(1, N)&lt;br&gt;
&#160; &#160; name1 = rng.Value&lt;br&gt;
&lt;br&gt;
&#160; &#160; If IsEmpty(rng.Value) Then &#160; &#160; &#160;&#039;Check for empty, the msgbox is optional&lt;br&gt;
&#160; &#160; &#160; &#160; MsgBox &quot;Category name is empty at &quot; &amp; rng.Address _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &amp; vbNewLine &amp; &quot;List autoupdating will continue.&quot;&lt;br&gt;
&#160; &#160; &#160; &#160; GoTo CategoryMissing:&lt;br&gt;
&#160; &#160; End If&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; For i = 1 To Len(name1) &#160; &#160; &#039;Check for non-alphanumeric characters&lt;br&gt;
&#160; &#160; &#160; &#160; char1 = Mid(name1, i, 1)&lt;br&gt;
&#160; &#160; &#160; &#160; If Not char1 Like &quot;[A-Z,a-z,0-9 ]&quot; Then&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; MsgBox &quot;Category Name Contains Invalid Character at &quot; &amp; rng.Address _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &amp; vbNewLine &amp; &quot;Please Correct&quot;, vbCritical&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Exit Sub&lt;br&gt;
&#160; &#160; &#160; &#160; End If&lt;br&gt;
&#160; &#160; Next i&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#039;Redefine rng as data just below name of category&lt;br&gt;
&#039;If statement handles case that column data has 0 or 1 element&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; If rng(2, 1) = &quot;&quot; Or rng(3, 1) = &quot;&quot; Then&lt;br&gt;
&#160; &#160; &#160; &#160; Set rng = rng(2, 1)&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&#039;If column data has at least 2 elements, rng defined as entire column&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&#160; &#160; &#160; &#160; Else: Set rng = Range(rng.Cells(2, 1), rng.End(xlDown))&lt;br&gt;
&#160; &#160; &#160; &#160; End If&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&#039;Redefine name1 without spaces, then define named range back to workbook&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&#160; &#160; name1 = Replace(name1, &quot; &quot;, &quot;&quot;)&lt;br&gt;
&#160; &#160; ActiveWorkbook.Names.Add name1, RefersTo:=rng&lt;br&gt;
&#160; &#160; ActiveWorkbook.Names(name1).Comment = (&quot;AutoUpdate - &quot; &amp; range_name)&lt;br&gt;
&lt;br&gt;
CategoryMissing:&lt;br&gt;
&lt;br&gt;
Next N&lt;br&gt;
&lt;br&gt;
End Sub&lt;/div&gt;&lt;/div&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;Now simply set the Data Validation at A1 =&quot;IndustryCategories&quot;, &lt;br&gt;
and the Data Validation at A2 =Indirect(Substitute(A1,&quot; &quot;,&quot;&quot;)&lt;br&gt;
&lt;br&gt;
FYI this also works for dependent comboboxes:&lt;/div&gt;&lt;/div&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;Private Sub UserForm_Initialize()&lt;br&gt;
ComboBox1.List = WorksheetFunction.Transpose(Range(&quot;IndustryCategories&quot;))&lt;br&gt;
End Sub&lt;br&gt;
&lt;br&gt;
Private Sub ComboBox1_Change()&lt;br&gt;
ComboBox2.RowSource = Names(Replace(ComboBox1.Text, &quot; &quot;, &quot;&quot;))&lt;br&gt;
End Sub&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Not bad for a guy who started learning this two weeks ago. &#160;Would appreciate any comments/criticisms.&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>@Dick, you are correct, cell functions are confined to changing the value of the cell, and are not permitted to change the cell&#8217;s format, or do anything outside the cell.  </p>
<p>I just wanted to post how I finally SOLVED this problem with a slick workaround by not using offset() function in my dynamic named range.  I ended up making the ranges dynamic with a nifty worksheet macro.  The code seems long, but that&#8217;s because of some defensive coding, without it, the whole thing is about 10 lines.  Here is my spread sheet.</p>
<p>A   B   C   D<br />
&#8212;&#8212;&#8212;<br />
x   y   z   a<br />
b   c       q<br />
n           m<br />
            p</p>
<p>So I have named range that goes across the top row &#8211; call it &#8220;IndustryCategories&#8221;, and the lower elements as my subcategories.  This works with multiple lists on the same sheet (as long as their not touching).  And it allows the user to simply add more subcategories as they please.  The worksheet sub is as follows:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Private Sub Worksheet_Change(ByVal Target As Range)</p>
<p>DynamicHLookup (&#8220;IndustryCategories&#8221;)<br />
DynamicHLookup (&#8220;SkillCategories&#8221;)</p>
<p>End Sub</p>
<p>Private Sub DynamicHLookup(range_name As String)</p>
<p>Set rngA = Range(range_name)<br />
Dim rng As Range<br />
Dim N, i As Integer<br />
Dim name1 As String</p>
<p>For N = 1 To rngA.Columns.Count</p>
<p>&#8216;Define rng as top row cell, Category name</p>
<p>&nbsp; &nbsp; Set rng = rngA(1, N)<br />
&nbsp; &nbsp; name1 = rng.Value</p>
<p>&nbsp; &nbsp; If IsEmpty(rng.Value) Then &nbsp; &nbsp; &nbsp;&#8217;Check for empty, the msgbox is optional<br />
&nbsp; &nbsp; &nbsp; &nbsp; MsgBox &#8220;Category name is empty at &#8221; &amp;amp; rng.Address _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;amp; vbNewLine &amp;amp; &#8220;List autoupdating will continue.&#8221;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GoTo CategoryMissing:<br />
&nbsp; &nbsp; End If<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; For i = 1 To Len(name1) &nbsp; &nbsp; &#8216;Check for non-alphanumeric characters<br />
&nbsp; &nbsp; &nbsp; &nbsp; char1 = Mid(name1, i, 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Not char1 Like &#8220;[A-Z,a-z,0-9 ]&#8221; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgBox &#8220;Category Name Contains Invalid Character at &#8221; &amp;amp; rng.Address _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;amp; vbNewLine &amp;amp; &#8220;Please Correct&#8221;, vbCritical<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit Sub<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; Next i<br />
&nbsp; &nbsp; <br />
&#8216;Redefine rng as data just below name of category<br />
&#8216;If statement handles case that column data has 0 or 1 element<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; If rng(2, 1) = &#8220;&#8221; Or rng(3, 1) = &#8220;&#8221; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set rng = rng(2, 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&#8216;If column data has at least 2 elements, rng defined as entire column<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; Else: Set rng = Range(rng.Cells(2, 1), rng.End(xlDown))<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&#8216;Redefine name1 without spaces, then define named range back to workbook<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; name1 = Replace(name1, &#8221; &#8220;, &#8220;&#8221;)<br />
&nbsp; &nbsp; ActiveWorkbook.Names.Add name1, RefersTo:=rng<br />
&nbsp; &nbsp; ActiveWorkbook.Names(name1).Comment = (&#8220;AutoUpdate &#8211; &#8221; &amp;amp; range_name)</p>
<p>CategoryMissing:</p>
<p>Next N</p>
<p>End Sub</p></div>
</div>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Now simply set the Data Validation at A1 =&#8221;IndustryCategories&#8221;, <br />
and the Data Validation at A2 =Indirect(Substitute(A1,&#8221; &#8220;,&#8221;")</p>
<p>FYI this also works for dependent comboboxes:</p></div>
</div>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Private Sub UserForm_Initialize()<br />
ComboBox1.List = WorksheetFunction.Transpose(Range(&#8220;IndustryCategories&#8221;))<br />
End Sub</p>
<p>Private Sub ComboBox1_Change()<br />
ComboBox2.RowSource = Names(Replace(ComboBox1.Text, &#8221; &#8220;, &#8220;&#8221;))<br />
End Sub</p>
<p>
Not bad for a guy who started learning this two weeks ago. &nbsp;Would appreciate any comments/criticisms.</div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64565</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Mon, 06 Jun 2011 15:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64565</guid>
		<description>&lt;p&gt;@Dick... Do you by any chance have a list of those exceptions (or a good link to such a list)?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Dick&#8230; Do you by any chance have a list of those exceptions (or a good link to such a list)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64562</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Mon, 06 Jun 2011 14:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64562</guid>
		<description>&lt;p&gt;Steve: With a few exceptions, a UDF called from a worksheet formula can only return a value.  It can&#039;t create a new named range.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Steve: With a few exceptions, a UDF called from a worksheet formula can only return a value.  It can&#8217;t create a new named range.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-64283</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 03 Jun 2011 06:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-64283</guid>
		<description>&lt;p&gt;Dude, this problem is killing me, I haven&#039;t gotten anything to work satisfactorily.  I had a very simple idea, but I can&#039;t seem to make it work.  It goes like this (D2F means dynamic to fixed):&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;Public Function D2F(range_name As String) As String&lt;br&gt;
&lt;br&gt;
&#160; &#160; Application.Volatile&lt;br&gt;
&lt;br&gt;
&#160; &#160; Dim rng As Range&lt;br&gt;
&#160; &#160; Set rng = Range(range_name)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; ThisWorkbook.Names.Add name:=range_name &amp; &quot;2&quot;, RefersTo:=rng&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; D2F = range_name &amp; &quot;2&quot;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Basically I make a second copy of my range called range2 which is fixed.  But the thing that is driving me nuts is that when I call this formula in VBA it works fine:&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;Sub test()&lt;br&gt;
&lt;br&gt;
Dim name As String&lt;br&gt;
name = D2F(&quot;namedrange&quot;)&lt;br&gt;
&lt;br&gt;
End Sub&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;but when I call it from the spreadsheet, it gives me a #Value error:&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;=D2F(&quot;namedrange&quot;)&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;little help?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dude, this problem is killing me, I haven&#8217;t gotten anything to work satisfactorily.  I had a very simple idea, but I can&#8217;t seem to make it work.  It goes like this (D2F means dynamic to fixed):</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Public Function D2F(range_name As String) As String</p>
<p>&nbsp; &nbsp; Application.Volatile</p>
<p>&nbsp; &nbsp; Dim rng As Range<br />
&nbsp; &nbsp; Set rng = Range(range_name)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; ThisWorkbook.Names.Add name:=range_name &amp; &#8220;2&#8243;, RefersTo:=rng<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; D2F = range_name &amp; &#8220;2&#8243;</div>
</div>
<p>Basically I make a second copy of my range called range2 which is fixed.  But the thing that is driving me nuts is that when I call this formula in VBA it works fine:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">Sub test()</p>
<p>Dim name As String<br />
name = D2F(&#8220;namedrange&#8221;)</p>
<p>End Sub</p></div>
</div>
<p>but when I call it from the spreadsheet, it gives me a #Value error:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container text default">
<div style="white-space: nowrap;" class="text codecolorer">=D2F(&#8220;namedrange&#8221;)</div>
</div>
<p>little help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarrod</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-62603</link>
		<dc:creator>Jarrod</dc:creator>
		<pubDate>Tue, 26 Apr 2011 04:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-62603</guid>
		<description>&lt;p&gt;Hey Guys,&lt;/p&gt;
&lt;p&gt;I am having this error and it driving me slowley (I mean quickly) insane!&lt;br&gt;
I have used the following formulat to define the named ranges in my workbook:&lt;/p&gt;
&lt;p&gt;=OFFSET(Operators!$B$2,0,0,COUNTA(Operators!$B:$B)-1)&lt;/p&gt;
&lt;p&gt;which is working beautifully...&lt;/p&gt;
&lt;p&gt;I started having isses with my validated lists, running into the 255 character limit hence, I came across the INDIRECT() function. &lt;/p&gt;
&lt;p&gt;I have tried using both the UDF examples above (DINDIRECT &amp; DRNG_ADDRESS) and each time I get the error that states the following:&lt;/p&gt;
&lt;p&gt;&quot;A named range you specified cannot be found&quot;&lt;/p&gt;
&lt;p&gt;I have copy &amp; pasted the functions from this page and called them using the correct syntax.&lt;/p&gt;
&lt;p&gt;Anyone else come across this problem?&lt;/p&gt;
&lt;p&gt;Thanks in advance Gurus...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Guys,</p>
<p>I am having this error and it driving me slowley (I mean quickly) insane!<br />
I have used the following formulat to define the named ranges in my workbook:</p>
<p>=OFFSET(Operators!$B$2,0,0,COUNTA(Operators!$B:$B)-1)</p>
<p>which is working beautifully&#8230;</p>
<p>I started having isses with my validated lists, running into the 255 character limit hence, I came across the INDIRECT() function. </p>
<p>I have tried using both the UDF examples above (DINDIRECT &amp; DRNG_ADDRESS) and each time I get the error that states the following:</p>
<p>&#8220;A named range you specified cannot be found&#8221;</p>
<p>I have copy &amp; pasted the functions from this page and called them using the correct syntax.</p>
<p>Anyone else come across this problem?</p>
<p>Thanks in advance Gurus&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/01/indirect-and-dynamic-ranges/#comment-53181</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Tue, 26 Oct 2010 15:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1037#comment-53181</guid>
		<description>&lt;p&gt;I have been trying to figure out a way to have a dynamic lookup for unique numbers over multiple sheets. This formula works fine when I type the sheet reference in manually as Start:End!$E$66:$E82. See below:&lt;/p&gt;
&lt;p&gt;{=IF(ISERR(SMALL(IF(FREQUENCY(Start:End!$E$66:$E82,ROW($1:$1006))0,ROW($1:$1006),&quot;&quot;),ROW($A1))),&quot;&quot;,SMALL(IF(FREQUENCY(Start:End!$E$66:$E82,ROW($1:$1006))0,ROW($1:$1006),&quot;&quot;),ROW($A1)))}&lt;/p&gt;
&lt;p&gt;However if I try to get tricky by making the reference INDIRECT so I can dynamically fill out the report page without having to manually update each and every formula, then it fails as INDIRECT can&#039;t process the sheet range (works fine for a single worksheet):&lt;/p&gt;
&lt;p&gt;{=IF(ISERR(SMALL(IF(FREQUENCY(INDIRECT(&quot;Start:End!&quot;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&quot;&#039;&quot;&amp;$A$4&amp;&quot;&#039;!2:2?),0)+2,4),&quot;1?,&quot;&quot;)&amp;&quot;66:&quot;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&quot;&#039;&quot;&amp;$A$4&amp;&quot;&#039;!2:2?),0)+2,4),&quot;1?,&quot;&quot;)&amp;&quot;84?),ROW(1:1006))0,ROW(1:1006),&quot;&quot;),ROW($A2))),&quot;&quot;,SMALL(IF(FREQUENCY(INDIRECT(&quot;Start:End!&quot;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&quot;&#039;&quot;&amp;$A$4&amp;&quot;&#039;!2:2?),0)+2,4),&quot;1?,&quot;&quot;)&amp;&quot;66:&quot;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&quot;&#039;&quot;&amp;$A$4&amp;&quot;&#039;!2:2?),0)+2,4),&quot;1?,&quot;&quot;)&amp;&quot;84?),ROW(1:1006))0,ROW(1:1006),&quot;&quot;),ROW($A2)))}&lt;/p&gt;
&lt;p&gt;If anybody has any ideas, I would reaally appreciate your help. The DINDIRECT doesn&#039;t resolve this problem.&lt;/p&gt;
&lt;p&gt;-Mike.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have been trying to figure out a way to have a dynamic lookup for unique numbers over multiple sheets. This formula works fine when I type the sheet reference in manually as Start:End!$E$66:$E82. See below:</p>
<p>{=IF(ISERR(SMALL(IF(FREQUENCY(Start:End!$E$66:$E82,ROW($1:$1006))0,ROW($1:$1006),&#8221;"),ROW($A1))),&#8221;",SMALL(IF(FREQUENCY(Start:End!$E$66:$E82,ROW($1:$1006))0,ROW($1:$1006),&#8221;"),ROW($A1)))}</p>
<p>However if I try to get tricky by making the reference INDIRECT so I can dynamically fill out the report page without having to manually update each and every formula, then it fails as INDIRECT can&#8217;t process the sheet range (works fine for a single worksheet):</p>
<p>{=IF(ISERR(SMALL(IF(FREQUENCY(INDIRECT(&#8220;Start:End!&#8221;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&#8220;&#8216;&#8221;&amp;$A$4&amp;&#8221;&#8216;!2:2?),0)+2,4),&#8221;1?,&#8221;")&amp;&#8221;66:&#8221;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&#8220;&#8216;&#8221;&amp;$A$4&amp;&#8221;&#8216;!2:2?),0)+2,4),&#8221;1?,&#8221;")&amp;&#8221;84?),ROW(1:1006))0,ROW(1:1006),&#8221;"),ROW($A2))),&#8221;",SMALL(IF(FREQUENCY(INDIRECT(&#8220;Start:End!&#8221;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&#8220;&#8216;&#8221;&amp;$A$4&amp;&#8221;&#8216;!2:2?),0)+2,4),&#8221;1?,&#8221;")&amp;&#8221;66:&#8221;&amp;SUBSTITUTE(ADDRESS(1,COLUMN($A$1)+MATCH(D$2,INDIRECT(&#8220;&#8216;&#8221;&amp;$A$4&amp;&#8221;&#8216;!2:2?),0)+2,4),&#8221;1?,&#8221;")&amp;&#8221;84?),ROW(1:1006))0,ROW(1:1006),&#8221;"),ROW($A2)))}</p>
<p>If anybody has any ideas, I would reaally appreciate your help. The DINDIRECT doesn&#8217;t resolve this problem.</p>
<p>-Mike.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

