Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2002
Windows XP Pro SP2 I have an array that is filled with range objects. The range extents are rows of data, from A to M and from many different row numbers. How do I access a particular cell value within a range object? For instance: i = 0 For Each cell in myRange.Cells If cell.Offset(0, 2).Value < cell.Offset(0,5 ).Value Then i = i + 1 Set NewRng(i) = Range(cell, cell.Offset(0, 12)) End If Next cell 'Now loop through NewRng and evaluate the cell value in the 4th column of NewRng For i = 1 to TotRngs Msgbox NewRng(i).????.Address 'what should I put in place of ???? Next i Any and all help appreciated. -gk- ================================================== ====================== "The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone." -Greg Kot in Wilco Learning How To Die- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello GK, To get the 4th column's address for each NewRng, do this... For i = 1 to TotRngs Msgbox NewRng(i).Cells(1, 4).Address Next i Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=502703 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like this, so use Cells:
Sub test() Dim i As Byte Dim arr(1 To 10) As Range For i = 1 To 10 Set arr(i) = Range(Cells(i, 1), Cells(i, 5)) Next For i = 1 To 5 MsgBox arr(i).Cells(i) Next End Sub RBS "39N 95W" wrote in message ... Excel 2002 Windows XP Pro SP2 I have an array that is filled with range objects. The range extents are rows of data, from A to M and from many different row numbers. How do I access a particular cell value within a range object? For instance: i = 0 For Each cell in myRange.Cells If cell.Offset(0, 2).Value < cell.Offset(0,5 ).Value Then i = i + 1 Set NewRng(i) = Range(cell, cell.Offset(0, 12)) End If Next cell 'Now loop through NewRng and evaluate the cell value in the 4th column of NewRng For i = 1 to TotRngs Msgbox NewRng(i).????.Address 'what should I put in place of ???? Next i Any and all help appreciated. -gk- ================================================== ====================== "The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone." -Greg Kot in Wilco Learning How To Die- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct Question Working With Start and End Date Range | Excel Worksheet Functions | |||
3d array not working | Excel Worksheet Functions | |||
array, range question | Excel Discussion (Misc queries) | |||
Array Formula Not Working with Range with Formulas | Excel Discussion (Misc queries) | |||
Assigning range to array not working | Excel Programming |