View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default loop through columns

"Does not seem to work"???? What happens?

Alan Beban

hotherps < wrote:
Nigel,

Is this you way you suggested to set it up?

Dim c
Dim i As Integer
Dim rng As Range
Dim irng As Range
Dim iloop As Integer

On Error Resume Next
With Sheets("MonTest")
Range("G11:CX125").ClearContents
End With
Range("G11:CX125").Formula =
"=IF(AND(g$9=$B11,g$9<=$C11),""..."","""")"
Range("G11:CX125").Value = Range("G11:CX125").Value

'For Each Cell In Range("G11:CX125")

For iloop = 7 To 102 Step 8
Set irng = Range(Cells(9, iloop), Cells(300, iloop + 7))
' act on your range irng in here

c = Array(20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10)
For i = 0 To 11
If Cells(356, c(i)).Value = Cells(305, c(i)) And Cell.Value "" _
And Cells(Cell.Row, c(i) + 97) = "x" Then _
Cell.Value = Cells(9, c(i) + 97)
Next i
'Next
Next iloop

Does not seem to work
thanks


---
Message posted from http://www.ExcelForum.com/