Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using Variables in R1C1 formulas

I am trying to create a formula in a cell to set the value of the cell equal
to another cell that is a varible number of cells away.

for example
Dim x As Integer
x = 4
Range("B1").FormulaR1C1 = "=R[x+1]C"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Using Variables in R1C1 formulas

Hi Alex,

Range("B1").FormulaR1C1 = "=R[" & x+1 & "]C"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Alex R" <Alex wrote in message ...
|I am trying to create a formula in a cell to set the value of the cell equal
| to another cell that is a varible number of cells away.
|
| for example
| Dim x As Integer
| x = 4
| Range("B1").FormulaR1C1 = "=R[x+1]C"
|


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
Copying formulas using "+" cell reference causes r1c1 in linked sh Andy D Excel Discussion (Misc queries) 4 October 25th 07 05:11 PM
Variables in formulas build Excel Worksheet Functions 9 October 11th 07 12:35 PM
variables in formulas [email protected] Excel Programming 2 February 15th 07 03:58 PM
How can I use variables in formulas in VB? thorsten Excel Discussion (Misc queries) 2 May 16th 06 08:22 PM
using variables in formula in R1C1 mode domin Excel Programming 10 March 22nd 05 12:04 AM


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