LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel: VB Macro programming problem with formula writing

I am trying to enter addresses of cells in one worksheet ("source_sheet")
into a matrix of cells in a separate worksheet ("dest_sheet") using a
formula. I am using a nested for loop to fill the appropriate cells in
"dest_sheet". The code works properly in that it writes to the proper cells
in "dest_sheet". It does not work properly in that the formulas that are
written into the cells do not reference the correct addresses.

my write statement inside the for loops is:

Cells(write_row + j, 7).Formula = "='" & source_sheet & "'!r[" & read_col &
"]c[" & read_row & "]"

The resulting addresses refer to the proper sheet ("source_sheet"), but the
addresses of the cells are not correct.

An example formula is:

='raw data 25C'!G3

where 'raw data 25C' is accurate but G3 is not.

Am I misusing the RC cell reference?

HELP!

 
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
Problem writing formula Alf[_13_] Excel Programming 3 July 5th 06 11:27 PM
Problem writing formula Millicent Excel Worksheet Functions 1 March 29th 06 02:26 AM
Formula writing problem Bob Excel Worksheet Functions 2 November 4th 05 10:33 PM
VB Macro writing a formula to a cell Neal Zimm Excel Programming 2 September 15th 05 08:09 PM
macro programming problem Dave Murto[_2_] Excel Programming 1 January 3rd 04 02:29 AM


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