Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default R1C1 Notation???

I have the following code in my VB:

Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R-12C2)"

My next procedure in the macro drags the formula down the range of cells,
however I want R-12C2 to reference the same cell [EF25] as it is dragged down.

Is there a code to do such a task???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default R1C1 Notation???

That doesn't look like a valid formula to me.

I bet you meant:

Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R[-12]C2)"



But I can refer to EF25 by using:
R25C136

So try:

Range("ED37").FormulaR1C1 = "=-(RC[-118]*R25C136)"



Clueless wrote:

I have the following code in my VB:

Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R-12C2)"

My next procedure in the macro drags the formula down the range of cells,
however I want R-12C2 to reference the same cell [EF25] as it is dragged down.

Is there a code to do such a task???


--

Dave Peterson
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
R1C1 notation in VBA code Fred Holmes Excel Programming 8 March 21st 09 01:06 PM
Sumproduct with A1 notation instead of R1C1 sgltaylor Excel Programming 2 September 12th 08 01:04 PM
R1C1 Notation in VBA Fred Holmes Excel Programming 1 October 21st 05 09:33 PM
R1C1 Notation brym Excel Programming 4 July 27th 03 09:47 PM


All times are GMT +1. The time now is 05:27 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"