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: 69
Default summing dynamic ranges

Hi there

I have column of data in blocks of consecutive cells. There are a varying
number of rows containing data and varying number of blank rows between the
data.

I have used the following code to set the average for the last block of data
in the column....

Dim rgSumRange As Range
Dim rgAverage As Range



Cells(Rows.Count, "o").End(xlUp).Offset(0, 0).Select

Set rgSumRange = ActiveCell.CurrentRegion.Columns(15)
Set rgAverage = rgSumRange.Rows(rgSumRange.Rows.Count + 1)

rgAverage.Formula = "=Average(" & rgSumRange.Columns(1).Address(True, False)
& ")"

rgAverage.Font.Bold = True

I need to navigate up the sheet past the empty ros to the next block of data.

How do I do that please?

 
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
summing name range in the same column with Dynamic name ranges Jeff Excel Worksheet Functions 8 September 24th 06 05:19 AM
Counting variable ranges and auto-summing variable ranges Father Guido[_5_] Excel Programming 2 March 29th 06 04:07 AM
summing ranges Markus Scheible[_2_] Excel Programming 2 January 24th 05 08:51 AM
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM
Summing ranges... Kevin Excel Programming 3 October 9th 03 09:19 PM


All times are GMT +1. The time now is 01:43 AM.

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

About Us

"It's about Microsoft Excel"