View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Refer to Ranges using Cells notation

There are several ways. One is

Set rng = Range("A1")
MsgBox Range(rng(1),rng(100)).Address

It will display $A$1:$A$100

Alan Beban

Scott P wrote:
Hi,

I am trying to pass through a worksheet using VBA with a nested For loop and
would like to refer to the cells that I pass through using the Cells(row,
col) notation. Is there a way to refer to a range of cells (e.g. A1:A100)
using the Cells(row, col) notation instead of having to use the Range
notation?

Thanks in advance.