PC Review


Reply
Thread Tools Rate Thread

Address Referencing

 
 
=?Utf-8?B?SW4xMHNKUA==?=
Guest
Posts: n/a
 
      21st Sep 2007
When generating a formula for a given cell through VBA, I need to be able to
combine a relative reference (of form of R[x]C[y]) and an address retrieved
from a different sheet (of form Sheet1!A12). When the VBA accomplishes this,
the cell reference is invariably returned as a literal value: 'A12' and no
longer functions as a cell reference. This seems new to Excel 2003 and is
extremely unhelpful. However, any VBA coding I made in Excel 2000 with
exactly this form of coding still functions properly. Can anyone advise me?
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      21st Sep 2007
I'm not sure what you're after, but perhaps the following will shed some
light:

Range("C10").Formula = Application.ConvertFormula("=R[-1]C[-2]", _
xlR1C1, xlA1, , relativeto:=ActiveCell) & _
"+" & Range("F1").Address(False, False)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"In10sJP" <(E-Mail Removed)> wrote in message
news:7ADB8C31-222B-44D3-86C7-(E-Mail Removed)...
> When generating a formula for a given cell through VBA, I need to be able
> to
> combine a relative reference (of form of R[x]C[y]) and an address
> retrieved
> from a different sheet (of form Sheet1!A12). When the VBA accomplishes
> this,
> the cell reference is invariably returned as a literal value: 'A12' and no
> longer functions as a cell reference. This seems new to Excel 2003 and is
> extremely unhelpful. However, any VBA coding I made in Excel 2000 with
> exactly this form of coding still functions properly. Can anyone advise
> me?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing dates against Products, in order to find the Qty. Without using Column referencing dancook79@googlemail.com Microsoft Excel Discussion 1 26th Jan 2009 12:17 AM
Referencing a cell address in the Offset formla Highlystrung Microsoft Excel Worksheet Functions 3 13th Nov 2008 09:42 PM
Referencing the same cell address while copying a formula =?Utf-8?B?ZXhjZWx0eXJv?= Microsoft Excel Worksheet Functions 2 23rd May 2007 04:26 PM
referencing cell address cereldine Microsoft Excel Programming 4 31st Mar 2006 11:41 AM
referencing a checkbox cell address in a worksheet =?Utf-8?B?RXJpayBBbmRyZWFzc2Vu?= Microsoft Excel Programming 1 28th Jun 2005 02:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:16 AM.