J
jss
I often have columns of numbers, with a label, that I need to average (or
get the standard deviation, etc.). The column length varies, and I would
like to not worry about having a constant number of rows between the cell I
am in when I run the macro and the cell with the label.
Manually, I use
=average(
end, down arrow ' gets me to the label
down arrow ' first data cell
control shift down ' last data cell
Enter ' completes entry, calculates average
This works fine for other columns of the same length, but with other data it
will use the same sized range.
I tried a few phrases in Google, but didn't see anything other than the
recommendation to use the relative reference setting. This does work better
than absolute, but the important part of the macro turns out the same in
either case:
ActiveCell.FormulaR1C1 = "=AVERAGE(R[11]C:R[238]C)"
Is there a way to do this or to actually record keystrokes in Excel?
Thanks for any tips.
get the standard deviation, etc.). The column length varies, and I would
like to not worry about having a constant number of rows between the cell I
am in when I run the macro and the cell with the label.
Manually, I use
=average(
end, down arrow ' gets me to the label
down arrow ' first data cell
control shift down ' last data cell
Enter ' completes entry, calculates average
This works fine for other columns of the same length, but with other data it
will use the same sized range.
I tried a few phrases in Google, but didn't see anything other than the
recommendation to use the relative reference setting. This does work better
than absolute, but the important part of the macro turns out the same in
either case:
ActiveCell.FormulaR1C1 = "=AVERAGE(R[11]C:R[238]C)"
Is there a way to do this or to actually record keystrokes in Excel?
Thanks for any tips.