<?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: Excel VBA Range Object: 18 Useful Ways Of Referring To Cell Ranges	</title>
	<atom:link href="https://powerspreadsheets.com/excel-vba-range-object/feed/" rel="self" type="application/rss+xml" />
	<link>https://powerspreadsheets.com/excel-vba-range-object/</link>
	<description>Excel and VBA tutorials and training. Learn how to use Microsoft Excel and Visual Basic for Applications now.</description>
	<lastBuildDate>Thu, 21 Mar 2024 06:17:11 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: jim klyman		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-818</link>

		<dc:creator><![CDATA[jim klyman]]></dc:creator>
		<pubDate>Thu, 21 Mar 2024 06:17:11 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-818</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://powerspreadsheets.com/excel-vba-range-object/#comment-356&quot;&gt;Arif Khan&lt;/a&gt;.

It looks like a combination of text and index number formats.  It looks to be selecting then entirety of row 2,   Range(&quot;2:2&quot;) would be another way of expressing this.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://powerspreadsheets.com/excel-vba-range-object/#comment-356">Arif Khan</a>.</p>
<p>It looks like a combination of text and index number formats.  It looks to be selecting then entirety of row 2,   Range(&#8220;2:2&#8221;) would be another way of expressing this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kebin		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-670</link>

		<dc:creator><![CDATA[Kebin]]></dc:creator>
		<pubDate>Sun, 21 Jan 2024 15:28:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-670</guid>

					<description><![CDATA[Excellent blog with clear expanation. Thanks]]></description>
			<content:encoded><![CDATA[<p>Excellent blog with clear expanation. Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Arif Khan		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-356</link>

		<dc:creator><![CDATA[Arif Khan]]></dc:creator>
		<pubDate>Sat, 16 Apr 2022 07:16:02 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-356</guid>

					<description><![CDATA[I came looking for an explanation of what this — Range(2 &#038; &quot;:&quot; &#038; 2) meant. I read you entire article. You have explained all that you have covered very well. 
Unfortunately, you did not cover what Range(2 &#038; &quot;:&quot; &#038; 2) refers to.

Will appreciate it very much if you would be kind enough to provide an explanation.

Thank you.]]></description>
			<content:encoded><![CDATA[<p>I came looking for an explanation of what this — Range(2 &amp; &#8220;:&#8221; &amp; 2) meant. I read you entire article. You have explained all that you have covered very well.<br />
Unfortunately, you did not cover what Range(2 &amp; &#8220;:&#8221; &amp; 2) refers to.</p>
<p>Will appreciate it very much if you would be kind enough to provide an explanation.</p>
<p>Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gemi P.		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-192</link>

		<dc:creator><![CDATA[Gemi P.]]></dc:creator>
		<pubDate>Mon, 19 Jun 2017 14:21:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-192</guid>

					<description><![CDATA[Thank you so much!!]]></description>
			<content:encoded><![CDATA[<p>Thank you so much!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lasciata		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-128</link>

		<dc:creator><![CDATA[Lasciata]]></dc:creator>
		<pubDate>Sun, 29 Jan 2017 10:56:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-128</guid>

					<description><![CDATA[Thank you very much for doing this. It has been a superb explanation.]]></description>
			<content:encoded><![CDATA[<p>Thank you very much for doing this. It has been a superb explanation.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan Elston		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-125</link>

		<dc:creator><![CDATA[Alan Elston]]></dc:creator>
		<pubDate>Wed, 18 Jan 2017 00:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-125</guid>

					<description><![CDATA[Hi Jorge, 

Here a  very minor comment. 

Like many people,  originally when I learnt about the Excel Spreadsheet Range Object, the multi Area aspect  ( more than one ) contiguous blocks of cells escaped me. It is “covered” in statements such as you have...”.... A selection of cells, regardless of whether they’re contiguous or not....”  .....  or another typical one..”.... a selection of cells containing one or more contiguous blocks of cells...”.

 The problem is that one then typically goes on to talk about things like Properties applied to a Range Object which  is a single block / area of contiguous cells. Indeed many ( not all ) Properties are only applicable to a single area Range Object. In this blog, however,  you do mention “How To Refer To A Range Of Non-Contiguous Cells Using the.... Range Property”. You are very thorough, many miss that one out. In fact  I had missed that, and only knew of it after reading this Blog! :) !  

 A couple of things enlightened me, and I have found has helped others to grasp the multi areas of the Range Object. This involves  mentioning something along these lines fairly early on:....

_1)  “...A Range Object can be, is typically, but must not be associated with a single cell or a single rectangular spreadsheet area of cells. The Range Object is organised into one or more such rectangular groups of cells, each one is named an Area...”

_then following on from that I often mention..

_2)  “... For many uses of a Range Object Reference, such as through a variable

 Rng. 

declared ( Dim ed ) As Range,  we are then  defaulting to the first area _..

Rng.Areas.Item(1).

However, I do note you have mentioned that  you may consider other things relating to multi Area Range Objects. Indeed you say that you may cover such topics as Application.Union method and the Range.Areas Property in further Blogs. I just find in particular the use of the word area or rather AreaS at an early stage useful. It helps to prevent falling into the trap of thinking that a Range Object is associated with a single rectangular area of cells

Alan]]></description>
			<content:encoded><![CDATA[<p>Hi Jorge, </p>
<p>Here a  very minor comment. </p>
<p>Like many people,  originally when I learnt about the Excel Spreadsheet Range Object, the multi Area aspect  ( more than one ) contiguous blocks of cells escaped me. It is “covered” in statements such as you have&#8230;”&#8230;. A selection of cells, regardless of whether they’re contiguous or not&#8230;.”  &#8230;..  or another typical one..”&#8230;. a selection of cells containing one or more contiguous blocks of cells&#8230;”.</p>
<p> The problem is that one then typically goes on to talk about things like Properties applied to a Range Object which  is a single block / area of contiguous cells. Indeed many ( not all ) Properties are only applicable to a single area Range Object. In this blog, however,  you do mention “How To Refer To A Range Of Non-Contiguous Cells Using the&#8230;. Range Property”. You are very thorough, many miss that one out. In fact  I had missed that, and only knew of it after reading this Blog! 🙂 !  </p>
<p> A couple of things enlightened me, and I have found has helped others to grasp the multi areas of the Range Object. This involves  mentioning something along these lines fairly early on:&#8230;.</p>
<p>_1)  “&#8230;A Range Object can be, is typically, but must not be associated with a single cell or a single rectangular spreadsheet area of cells. The Range Object is organised into one or more such rectangular groups of cells, each one is named an Area&#8230;”</p>
<p>_then following on from that I often mention..</p>
<p>_2)  “&#8230; For many uses of a Range Object Reference, such as through a variable</p>
<p> Rng. </p>
<p>declared ( Dim ed ) As Range,  we are then  defaulting to the first area _..</p>
<p>Rng.Areas.Item(1).</p>
<p>However, I do note you have mentioned that  you may consider other things relating to multi Area Range Objects. Indeed you say that you may cover such topics as Application.Union method and the Range.Areas Property in further Blogs. I just find in particular the use of the word area or rather AreaS at an early stage useful. It helps to prevent falling into the trap of thinking that a Range Object is associated with a single rectangular area of cells</p>
<p>Alan</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan Elston		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-117</link>

		<dc:creator><![CDATA[Alan Elston]]></dc:creator>
		<pubDate>Thu, 12 Jan 2017 18:44:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-117</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://powerspreadsheets.com/excel-vba-range-object/#comment-108&quot;&gt;Alan Elston&lt;/a&gt;.

Thanks, Jorge.

Mostly I was wondering if in addition to the two Properties to return a Range Object, I could consider the use of a string reference in a code line like _..
Application.Range(FullStringReference) 
_.. as a third way.. as some sort of direct “Object reference Method” rather than a Property. I guess the point is open to debate, - as you say VBA gives is so many possibilities it can get a bit overwhelming !!
Thanks for your input and thanks again for the Blog. It inspired me to re think..

Alan]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://powerspreadsheets.com/excel-vba-range-object/#comment-108">Alan Elston</a>.</p>
<p>Thanks, Jorge.</p>
<p>Mostly I was wondering if in addition to the two Properties to return a Range Object, I could consider the use of a string reference in a code line like _..<br />
Application.Range(FullStringReference)<br />
_.. as a third way.. as some sort of direct “Object reference Method” rather than a Property. I guess the point is open to debate, &#8211; as you say VBA gives is so many possibilities it can get a bit overwhelming !!<br />
Thanks for your input and thanks again for the Blog. It inspired me to re think..</p>
<p>Alan</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan Elston		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-108</link>

		<dc:creator><![CDATA[Alan Elston]]></dc:creator>
		<pubDate>Mon, 02 Jan 2017 17:50:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-108</guid>

					<description><![CDATA[Hi Jorge, this was a very nice Blog to refresh and consolidate my Range Object knowledge, thanks.

Just some comments out of interest. I guess I am just here, _1) commenting on a couple of statements / ideas.

(_1a) !b))  _  ... “...the most basic way of referring to Excel’s VBA Range object: the Range ( or Cells ) Property..”...

(_ 1c) ) _”... Range Object  is “ .. (always ) ..  “ contained within the Worksheet Object...”...

_1 ) Most basic way to reference a cell.

It is  not too clear to me if the most basic way of referencing a cell is through a  Range Property

It is all quite confusing. :( I may not quite understand these thing fully yet. )

Initially I am following all, for example.  

Let’s say,  I have defined Rng as a Range Object, then this type of code ( used within the Excel Application in VBA code ): _..

_1a)(i)  Rng=Worksheets(1).Cells(1, 1)

_.. is, I thought, and indeed,  as you also show, using the Cells Property of a Worksheet to return the Range Object. Similarly the Range Property of the worksheet can be used

_1a)(ii) Rng=Worksheets(1).Range(“A1”)

(  or similar in such a form  _1a)(ii) Rng=Worksheets(“Sheet1”).Range(“A1”)  ..  etc.. etc.... )

My experiments suggest the following is also acceptable for the same, and I am not sure if VBA may actually change _1a(ii)  “internally” as it were, to this  type of form

_1a)(iii)  Rng=Worksheets(1).Range(&quot;=&#039;[MyFile.xlsm]Sheet1&#039;!A1&quot;)

This last :1a)(iii) would still be using the Range Property of the worksheet. I think before and up to this point I am agreeing with referring way which uses the Cells or Range Properties of a Worksheet.  

But this last suggestion of mine , _1a)(iii) , I am ,   in fact  ,  not too sure about and in end effect a Range Object must be returned.  So this could be how VBA finally sees the final returned Range Object:-

_1b)(i)  Rng=Application.Range(&quot;=&#039;[MyFile.xlsm]Sheet1&#039;!A1&quot;)

This last one, I think, is a Range Object, but I am not too sure? We could have used this initially and hence , I think, possibly would have a more basic way of cell referencing with _1b)(i), that is to say explicitly referring to the Application Range

_1c) Rng=Application.Range(&quot;=&#039;[MyFile.xlsm]Sheet1&#039;!A1&quot;)

I realise that  one sees most typically a shortened version, an “unqualified” Range reference,    

Rng=Range(“A1”)

This leads to uncertainties as you have explained.

I also  understand what you are meaning when  referring to  the Range.Range Property.  For example

_1c) Rng=Application.Range(&quot;=&#039;[MyFile.xlsm]Sheet1&#039;!A1&quot;).Range(strAddress)

or like: 

 _1c) Rng=Application.Range(strReference).Range(strAddress)

is applying the Range Property of the Range Object of _1b)(i)  to the Range Object of _1b)(i)  

It is certainly annoying and confusing that  VBA uses the same word there for the Range Object and the Range Property that can be applied to it. 

I think _1c)  would be the equivalent – 

 (Application)  Range Range  Property of a Application Range ( Object, Method, or Property, or whatever it is! ) 

 - to the – 

 _1a)(i) Worksheet Cells Property ( or _1a)(ii)  Worksheet Range Property )  of a Worksheet. 

( I note that you can keep going infinitely with rng.Range.Range.Range.Range. Each  Range Property returning a new modified Range Object to which the next Range property is applied. You do make the Range.Range Property very Clear so I do not think I am saying in total much difference to you. )

Really I am just making the point of possibly being able to make a reference to a Range Object directly rather than through a Range or Cells Property. But I could be wrong here, of course. I am learning through people like you sharing their knowledge. :-)

_ The end result of all the above, is that I have got recently into always using variations of this type of way to reference a Range Object.

Dim strReference As String

  strReference = &quot;=&#039;[&quot; &#038; ThisWorkbook.Name &#038; &quot;]&quot; &#038; Worksheets.Item(1).Name &#038; &quot;&#039;!A1:C3&quot;

Dim Rng As Range

  Set Rng = Application.Range(strReference)

Although the long string reference, strReference, looks daunting, I find this a robust way to reference a Range Object:

 It gives me flexibility in the string build, and I have no confusion arising from where the code line might be. 

It appears to me, possibly naively,  to be the most basic Explicit form of referencing a Excel  Application Range Object

It has helped me to get a clear picture in preparing this Reply. Sorry if it is a bit long. 

Alan]]></description>
			<content:encoded><![CDATA[<p>Hi Jorge, this was a very nice Blog to refresh and consolidate my Range Object knowledge, thanks.</p>
<p>Just some comments out of interest. I guess I am just here, _1) commenting on a couple of statements / ideas.</p>
<p>(_1a) !b))  _  &#8230; “&#8230;the most basic way of referring to Excel’s VBA Range object: the Range ( or Cells ) Property..”&#8230;</p>
<p>(_ 1c) ) _”&#8230; Range Object  is “ .. (always ) ..  “ contained within the Worksheet Object&#8230;”&#8230;</p>
<p>_1 ) Most basic way to reference a cell.</p>
<p>It is  not too clear to me if the most basic way of referencing a cell is through a  Range Property</p>
<p>It is all quite confusing. 🙁 I may not quite understand these thing fully yet. )</p>
<p>Initially I am following all, for example.  </p>
<p>Let’s say,  I have defined Rng as a Range Object, then this type of code ( used within the Excel Application in VBA code ): _..</p>
<p>_1a)(i)  Rng=Worksheets(1).Cells(1, 1)</p>
<p>_.. is, I thought, and indeed,  as you also show, using the Cells Property of a Worksheet to return the Range Object. Similarly the Range Property of the worksheet can be used</p>
<p>_1a)(ii) Rng=Worksheets(1).Range(“A1”)</p>
<p>(  or similar in such a form  _1a)(ii) Rng=Worksheets(“Sheet1”).Range(“A1”)  ..  etc.. etc&#8230;. )</p>
<p>My experiments suggest the following is also acceptable for the same, and I am not sure if VBA may actually change _1a(ii)  “internally” as it were, to this  type of form</p>
<p>_1a)(iii)  Rng=Worksheets(1).Range(&#8220;='[MyFile.xlsm]Sheet1&#8242;!A1&#8221;)</p>
<p>This last :1a)(iii) would still be using the Range Property of the worksheet. I think before and up to this point I am agreeing with referring way which uses the Cells or Range Properties of a Worksheet.  </p>
<p>But this last suggestion of mine , _1a)(iii) , I am ,   in fact  ,  not too sure about and in end effect a Range Object must be returned.  So this could be how VBA finally sees the final returned Range Object:-</p>
<p>_1b)(i)  Rng=Application.Range(&#8220;='[MyFile.xlsm]Sheet1&#8242;!A1&#8221;)</p>
<p>This last one, I think, is a Range Object, but I am not too sure? We could have used this initially and hence , I think, possibly would have a more basic way of cell referencing with _1b)(i), that is to say explicitly referring to the Application Range</p>
<p>_1c) Rng=Application.Range(&#8220;='[MyFile.xlsm]Sheet1&#8242;!A1&#8221;)</p>
<p>I realise that  one sees most typically a shortened version, an “unqualified” Range reference,    </p>
<p>Rng=Range(“A1”)</p>
<p>This leads to uncertainties as you have explained.</p>
<p>I also  understand what you are meaning when  referring to  the Range.Range Property.  For example</p>
<p>_1c) Rng=Application.Range(&#8220;='[MyFile.xlsm]Sheet1&#8242;!A1&#8221;).Range(strAddress)</p>
<p>or like: </p>
<p> _1c) Rng=Application.Range(strReference).Range(strAddress)</p>
<p>is applying the Range Property of the Range Object of _1b)(i)  to the Range Object of _1b)(i)  </p>
<p>It is certainly annoying and confusing that  VBA uses the same word there for the Range Object and the Range Property that can be applied to it. </p>
<p>I think _1c)  would be the equivalent – </p>
<p> (Application)  Range Range  Property of a Application Range ( Object, Method, or Property, or whatever it is! ) </p>
<p> &#8211; to the – </p>
<p> _1a)(i) Worksheet Cells Property ( or _1a)(ii)  Worksheet Range Property )  of a Worksheet. </p>
<p>( I note that you can keep going infinitely with rng.Range.Range.Range.Range. Each  Range Property returning a new modified Range Object to which the next Range property is applied. You do make the Range.Range Property very Clear so I do not think I am saying in total much difference to you. )</p>
<p>Really I am just making the point of possibly being able to make a reference to a Range Object directly rather than through a Range or Cells Property. But I could be wrong here, of course. I am learning through people like you sharing their knowledge. 🙂</p>
<p>_ The end result of all the above, is that I have got recently into always using variations of this type of way to reference a Range Object.</p>
<p>Dim strReference As String</p>
<p>  strReference = &#8220;='[&#8221; &amp; ThisWorkbook.Name &amp; &#8220;]&#8221; &amp; Worksheets.Item(1).Name &amp; &#8220;&#8216;!A1:C3&#8221;</p>
<p>Dim Rng As Range</p>
<p>  Set Rng = Application.Range(strReference)</p>
<p>Although the long string reference, strReference, looks daunting, I find this a robust way to reference a Range Object:</p>
<p> It gives me flexibility in the string build, and I have no confusion arising from where the code line might be. </p>
<p>It appears to me, possibly naively,  to be the most basic Explicit form of referencing a Excel  Application Range Object</p>
<p>It has helped me to get a clear picture in preparing this Reply. Sorry if it is a bit long. </p>
<p>Alan</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: WangLis		</title>
		<link>https://powerspreadsheets.com/excel-vba-range-object/#comment-3</link>

		<dc:creator><![CDATA[WangLis]]></dc:creator>
		<pubDate>Mon, 10 Aug 2015 20:12:00 +0000</pubDate>
		<guid isPermaLink="false">https://powerspreadsheets.com/?p=1572#comment-3</guid>

					<description><![CDATA[Hi Jorge, I love your clear and easy-to-understand way of explaining even the most complicated excel topics. It definitely helps me to get better at my job. Thanks!]]></description>
			<content:encoded><![CDATA[<p>Hi Jorge, I love your clear and easy-to-understand way of explaining even the most complicated excel topics. It definitely helps me to get better at my job. Thanks!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: powerspreadsheets.com @ 2026-05-14 09:27:42 by W3 Total Cache
-->