Looping through Non contiguous cells in a row
"avi" wrote in message
...
Hello,
I want to loop accross each cell in a row oa a non contiguous range,
something like
for I=1 to NumberOfRows
for J=1 to NumberOfCols
msgbox MyRange.Rows(I).cells(I,J).value
next
next
The problem is that the J seems to refer to the contiguous range
starting with first column of the range
try changing
msgbox MyRange.Rows(I).cells(I,J).value
to
msgbox MyRange.cells(I,J).value
--
Clif McIrvin
(clare reads his mail with moe, nomail feeds the bit bucket :-)
|