Prev: how do I get one dropdown menu to trigger another one in excel
Next: Very Slow to open 2003 Excel Files
From: AL on 5 Apr 2010 16:58 I am trying to write a macro to fill a cell formula with +value(cell located at Control+UpArrow) which reference the grand total line of a pivot table. The row number may change after refresh so something like R[-7]C would not work.
From: מיכאל (מיקי) אבידן on 5 Apr 2010 17:16 The basic commend is: ActiveCell.End(xlUp).Select Try to fine-tune it to your needs. Micky "AL" wrote: > I am trying to write a macro to fill a cell formula with +value(cell located > at Control+UpArrow) which reference the grand total line of a pivot table. > The row number may change after refresh so something like R[-7]C would not > work.
From: AL on 6 Apr 2010 12:04
Thanks. The syntax helps. May be I should elaborate what I am trying to do. Cell E77 is grand total of a pivot table and total line row will fluctuate depending on my filter. On cell E90, I want to add a formula of +value(E77) i.e. ControlUpArrow. I type my macro as: ActiveCell.FormulaR1C1 = "=+VALUE(ActiveCell.End(xlUp).Select)" It returns an "Application-defined or object-defined error" I type my macro as: ActiveCell.FormulaR1C1 = "+VALUE(ActiveCell.End(xlUp).Select)" It returns +VALUE(ActiveCell.End(xlUp).Select) in Cell E90 Any suggestions? "מיכאל (מיקי) אבידן" wrote: > The basic commend is: > ActiveCell.End(xlUp).Select > Try to fine-tune it to your needs. > Micky > > > "AL" wrote: > > > I am trying to write a macro to fill a cell formula with +value(cell located > > at Control+UpArrow) which reference the grand total line of a pivot table. > > The row number may change after refresh so something like R[-7]C would not > > work. |