View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Javed Javed is offline
external usenet poster
 
Posts: 91
Default 2 dimensional loop, averageif formula

Hope the following will solve the problem

For i = lastrw + 2 To lastrw + 4
For ii = lastcol - 37 To lastcol
Cells(i, ii).Formula = "=averageif(a1:a" & lastrw & ",b" & i &
",c1:c" & lastcol & ")"
Next ii
Next i