I've created a macro and assigned it a hotKey for the Product formula (=product(1+C5:C10)-1).
The macro works fine but the short coming is that, the range that it selects is the range I selected when I recorded the macro. So in the above example, it would only select rows C5-C10. The way the macro below works is that, I would click in a cell right below my numbers (I have numbers in rows C5-C10) so I would click in row 11 and ctrl+q which does the product formula.
How can I get it to select all rows with a number in them above C11?
Macro:
ActiveCell.FormulaR1C1 = "=PRODUCT(1+R[-6]C:R[-1]C)-1"
Selection.FormulaArray = "=PRODUCT(1+R[-6]C:R[-1]C)-1"
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
thanks,
H.
The macro works fine but the short coming is that, the range that it selects is the range I selected when I recorded the macro. So in the above example, it would only select rows C5-C10. The way the macro below works is that, I would click in a cell right below my numbers (I have numbers in rows C5-C10) so I would click in row 11 and ctrl+q which does the product formula.
How can I get it to select all rows with a number in them above C11?
Macro:
ActiveCell.FormulaR1C1 = "=PRODUCT(1+R[-6]C:R[-1]C)-1"
Selection.FormulaArray = "=PRODUCT(1+R[-6]C:R[-1]C)-1"
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
thanks,
H.