Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
al al is offline
external usenet poster
 
Posts: 363
Default What is the syntax for control+UpArrow in Macro?

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default What is the syntax for control+UpArrow in Macro?

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
al al is offline
external usenet poster
 
Posts: 363
Default What is the syntax for control+UpArrow in Macro?

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for control source in combo box control dhstein Excel Discussion (Misc queries) 1 August 12th 09 05:38 PM
help with macro syntax Steve Excel Discussion (Misc queries) 2 February 10th 09 06:59 PM
Correct syntax for IF, Then in a macro Ken[_2_] Excel Worksheet Functions 5 June 21st 08 06:19 PM
question about syntax in a simple macro... Dave F Excel Discussion (Misc queries) 3 November 3rd 06 02:12 PM
Syntax to return the value of a control by reference Broadband Al Excel Discussion (Misc queries) 3 January 26th 06 01:20 AM


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"