Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SLP SLP is offline
external usenet poster
 
Posts: 58
Default absolute reference r1c1 code

How do I turn this so the first cell is an absolute reference? When I delete
the [] around the -1, I get an error message. Thanks.

ActiveCell.FormulaR1C1 = "=round(R[-1]c[0]*RC[7],2)"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default absolute reference r1c1 code

Try the below

'Column and row locked
ActiveCell.FormulaR1C1 = "=round(R" & ActiveCell.Row - 1 & "C" & _
ActiveCell.Column & "*RC[7],2)"

'Row locked
ActiveCell.FormulaR1C1 = "=round(R" & ActiveCell.Row - 1 & "C*RC[7],2)"


If this post helps click Yes
---------------
Jacob Skaria


"SLP" wrote:

How do I turn this so the first cell is an absolute reference? When I delete
the [] around the -1, I get an error message. Thanks.

ActiveCell.FormulaR1C1 = "=round(R[-1]c[0]*RC[7],2)"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default absolute reference r1c1 code


You can always use A1 addressing

Cell1Addr = cells(Activecell.Row - 1,ActiveCell.column).address
Cells2Addr = cells(activecell.Row,Activecell.column + 7).address
ActiveCell.Formula = "=round(" & Cell1Addr & "*" & Cell2Addr & ",2)"


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=151771

Microsoft Office Help

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
VBA r1c1 absolute previous row in formula SLP Excel Programming 3 November 6th 09 05:01 PM
Combining R1C1 and absolute reference in SUMPRODUCT in VBA Cornelia Excel Programming 1 June 15th 06 10:30 PM
How to code with the R1C1 Style of Reference? plh Excel Programming 3 April 22nd 06 07:31 PM
See code enclosed - Convert to formulas with absolute reference inculding the sheet references! Maria J-son Excel Programming 0 May 10th 05 08:40 AM
Absolute reference in R1C1 notation Tim C Excel Programming 2 August 14th 03 11:54 PM


All times are GMT +1. The time now is 02:40 AM.

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"