Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello. I would like to utilize your expertise again. Is there a way to to
loop through cells that have the form "$B$2", such as "$Bi$j", where i and j are integers. Is this possible? Is so how, because I tried with i and j type looping. Thanks again. D. Parker |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"D.Parker" wrote:
Hello. I would like to utilize your expertise again. Is there a way to to loop through cells that have the form "$B$2", such as "$Bi$j", where i and j are integers. $Bi$j could be $B2$3, which isn't a well-formed cell address. What exactly is it that you want to do? There may be ways do what you need without resorting to building cell addresses out of strings. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
$B$2 is a single cell. What is there to loop through. Unless you mean the
range bounded by A1 and B2. if that is the case then dim rngToSearch as range dim rngCurrent as range set rngToSearch = range(activesheet("A1"), activesheet("B2")) for each rngcurrent in rngToSearch msgbox rngCurrent.address next rngCurrent "D.Parker" wrote: Hello. I would like to utilize your expertise again. Is there a way to to loop through cells that have the form "$B$2", such as "$Bi$j", where i and j are integers. Is this possible? Is so how, because I tried with i and j type looping. Thanks again. D. Parker |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can form a cell address by using....
Range("B" & i) or....... Range("B" & i & ":B" & j ) but I think you must agree it is messy and difficult to read, also iterating the columns is also messy. You can use..... Cells(r1, c1) for single cells or ..... Range(Cells(r1, c1), Cells(r2, c2)) for a range. These allow you to loop through using the variables r1,c1,r2,c2 as required. Row first, Column second -- Cheers Nigel "D.Parker" wrote in message ... Hello. I would like to utilize your expertise again. Is there a way to to loop through cells that have the form "$B$2", such as "$Bi$j", where i and j are integers. Is this possible? Is so how, because I tried with i and j type looping. Thanks again. D. Parker |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In itself a cell is not absolute ($B$1) or relative (B1), or any combination
thereof. It can contain a formula or a function that uses one of those modes of addressing, but it could even contain more than one mode, or even all 4. What specifically are you trying to do? -- HTH RP (remove nothere from the email address if mailing direct) "D.Parker" wrote in message ... Hello. I would like to utilize your expertise again. Is there a way to to loop through cells that have the form "$B$2", such as "$Bi$j", where i and j are integers. Is this possible? Is so how, because I tried with i and j type looping. Thanks again. D. Parker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
reference cells when looping | Excel Discussion (Misc queries) | |||
Looping thru a range of cells | New Users to Excel | |||
Looping through Cells | Excel Programming | |||
Looping through a range of cells | Excel Programming | |||
Looping thru cells in a named range | Excel Programming |