Email discussion lists for the UK Education and Research communities

EXCEL-VB-DISCUSS@JISCMAIL.AC.UK

View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Options

Subject:

RE: dynamic R1C1 equations

From:

"John Putman" <[log in to unmask]>

Reply-To:

[log in to unmask]

Date:

Wed, 22 Mar 2000 08:59:45 -0700

Content-Type:

text/plain

Parts/Attachments:

 text/plain (39 lines)
 wouldn't you just need to change the formula to     Range("f" & x).FormulaR1C1 = "=SUM(R[" & i & "]C:R[-1]C)" and then apply i as a counter? -putman -----Original Message----- From: [log in to unmask] [mailto:[log in to unmask]]On Behalf Of Andrew Wright Sent: Wednesday, March 22, 2000 9:54 AM To: [log in to unmask] Subject: dynamic R1C1 equations Hullo, Writing a spot of code that utilizes r1c1 references to create a formula in a cell. Problem is that I need my formula to vary based upon a counter (the counter is obviously a dynamic variable). So the question is what code can I use to write a formula with the counter variable in it? Currently looks like this: Range("f" & myInt).FormulaR1C1 = "=SUM(R[-9]C:R[-1]C)" I would like a counter, "i" to replace the -9 R1C1 reference.... I'm sure I'm overlooking something quite easy, but I can't for the life of me get it at the moment... many thanks in advance, Andrew Andrew M. Wright, http://www.reis.com/ Senior Consultant, ReiSupport The Reis Reports 212.921.1122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Advanced Options