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?
Bookmarks