R1C1 Formula

P

Paul W Smith

I am trying to write a line of code which enters a formula in R1C1
reference, my line of code is:

Range("S1").offset(n,0).formulaR1C1 = "????????"

The problem I am having is getting the text at the end to work to replace
the question marks.

In Excel the formula is =RC[7]&" ("&RC[8]&")", but because of the "s this
does not compile. Can anyone tell me what I use in my formula to achieve
what I want?
 
D

Dave Peterson

Double up the double quotes:

.formular1c1 = "=RC[7]&"" (""&RC[8]&"")""
I am trying to write a line of code which enters a formula in R1C1
reference, my line of code is:

Range("S1").offset(n,0).formulaR1C1 = "????????"

The problem I am having is getting the text at the end to work to replace
the question marks.

In Excel the formula is =RC[7]&" ("&RC[8]&")", but because of the "s this
does not compile. Can anyone tell me what I use in my formula to achieve
what I want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top