Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Cell Formula

Hello,
I want to put a formula in a cell based on an actual row or column number.
I tried this, where FR = 3 in the code.

Cells(10 2).FormulaR1C1 = "= r[" & FR & "]c"

It gives me =B17 in the cell, not =B3 as I want.

Any help?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Cell Formula

Hi
When the final formula is of the form =R[2]c, the row will be offset by the
number inside the square brackets and column will remain the same. If you
want to fix the row to be 3 then your final formula should read =R3c.
Hence "= r" & FR & "c" should work.
Alok

"Bill" wrote:

Hello,
I want to put a formula in a cell based on an actual row or column number.
I tried this, where FR = 3 in the code.

Cells(10 2).FormulaR1C1 = "= r[" & FR & "]c"

It gives me =B17 in the cell, not =B3 as I want.

Any help?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Cell Formula

Cells(10, 2).FormulaR1C1 = "= r" & FR & "c"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bill" wrote in message
k.net...
Hello,
I want to put a formula in a cell based on an actual row or column number.
I tried this, where FR = 3 in the code.

Cells(10 2).FormulaR1C1 = "= r[" & FR & "]c"

It gives me =B17 in the cell, not =B3 as I want.

Any help?

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Cell Formula

One mo

Cells(10, 2).Formula = "=B" & FR


Bill wrote:

Hello,
I want to put a formula in a cell based on an actual row or column number.
I tried this, where FR = 3 in the code.

Cells(10 2).FormulaR1C1 = "= r[" & FR & "]c"

It gives me =B17 in the cell, not =B3 as I want.

Any help?

Thanks.


--

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
How can I make a blank cell in a formula cell with a range of cell Vi Excel Discussion (Misc queries) 5 June 21st 07 02:46 PM
adding a formula in a cell but when cell = 0 cell is blank Mike T Excel Worksheet Functions 5 May 31st 05 01:08 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


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