C
childofthe1980s
Hello:
Below, I have a macro in VBA that takes rows of data and averages them.
Columns C and E contain the averages.
I need to add programming that takes every row of averages from the 51st row
to the last row of data and multiplies them by 2, long story short.
Keep in mind that the spreadsheet that results from the programming below
does not contain contiguous row numbers. The first row of data, as of this
moment, is "5". The next row is "9", then "13", then "17", "21", "25". Last
month, the first row number was "4", then "7", then "12", .....
So, there is no consistency with the row numbers. That's what makes
throwing in a calculation of "times 2" for the 51st row onward complicated.
Anyway, what programming do I add to tell Excel to take the 51st and greater
rows of data in the spreadsheet and multiply the values in the records of
columns C and E by 2?
Selection.Subtotal GroupBy:=1, Function:=xlAverage, TotalList:=Array(3,
5) _
, Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Selection.Sort Key1:=Range("E2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Columns("C:C").Select
Selection.NumberFormat = "0"
Columns("E:E").Select
Selection.NumberFormat = "0"
Columns("A:A").ColumnWidth = 17.86
Columns("A:A").EntireColumn.AutoFit
Range("A1").Select
childofthe1980s
Below, I have a macro in VBA that takes rows of data and averages them.
Columns C and E contain the averages.
I need to add programming that takes every row of averages from the 51st row
to the last row of data and multiplies them by 2, long story short.
Keep in mind that the spreadsheet that results from the programming below
does not contain contiguous row numbers. The first row of data, as of this
moment, is "5". The next row is "9", then "13", then "17", "21", "25". Last
month, the first row number was "4", then "7", then "12", .....
So, there is no consistency with the row numbers. That's what makes
throwing in a calculation of "times 2" for the 51st row onward complicated.
Anyway, what programming do I add to tell Excel to take the 51st and greater
rows of data in the spreadsheet and multiply the values in the records of
columns C and E by 2?
Selection.Subtotal GroupBy:=1, Function:=xlAverage, TotalList:=Array(3,
5) _
, Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Selection.Sort Key1:=Range("E2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Columns("C:C").Select
Selection.NumberFormat = "0"
Columns("E:E").Select
Selection.NumberFormat = "0"
Columns("A:A").ColumnWidth = 17.86
Columns("A:A").EntireColumn.AutoFit
Range("A1").Select
childofthe1980s