LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default 2 dimensional loop, averageif formula

Hey guys, you've been extremely helpful in the recent past and
hopefully your genuis will shine again.

I am trying to run a 2 dimensional loop. starting cell ("lastrw
+2","lastcol-37"), i want to go cell by cell till "lastcol" and fill
each cell with an averageif formula. once 'lastcol' is reached i want
to start over again at 'lastrw+3' and loop again, then the same for
'lastrw+4'. I think i've got they syntax of the loop correct but i'm
struggling with the averageif formula. help? Here's what i've got so
far. I know... it must look a mess.

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AVERAGEIF FORMULA EXCEL 2007 tcbooks Excel Discussion (Misc queries) 1 April 12th 10 08:03 PM
Help with Averageif Formula (don't think I should use Averageif) MUmfleet Excel Discussion (Misc queries) 5 April 9th 09 04:53 PM
Export 1-dimensional array values to a two-dimensional table? Laurie Excel Programming 2 November 8th 07 03:51 PM
Changing a two-dimensional, one row array to one-dimensional Alan Beban[_2_] Excel Programming 1 September 16th 07 08:56 PM
How to generate formula from two dimensional array of data KROATA Excel Worksheet Functions 1 December 2nd 05 12:39 PM


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"