Formula + a variable

D

David

Hello Group,

I have a formula that is added via code:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]"
and I would like to reatin the formula and add a constant to it. z=1
I tried:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z
but this failed. I am not sure how to accomplish adding the variable amount
and retaining the code.

Another unrelated question. I am having trouble getting responses to these
questions via e-mail alert. I have been into the preferences area and it
appears set up correctly. I have also checked the check box in this window. I
also click the "Notify me of relpies" in the main window where you start with
the "New" question, suggestion or comment. But I still fail to get an e-mail.

Thanks,
 
C

Chip Pearson

ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z

should be

ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]+" & cstr(z)

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




Hello Group,

I have a formula that is added via code:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]"
and I would like to reatin the formula and add a constant to it. z=1
I tried:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z
but this failed. I am not sure how to accomplish adding the variable amount
and retaining the code.

Another unrelated question. I am having trouble getting responses to these
questions via e-mail alert. I have been into the preferences area and it
appears set up correctly. I have also checked the check box in this window. I
also click the "Notify me of relpies" in the main window where you start with
the "New" question, suggestion or comment. But I still fail to get an e-mail.

Thanks,
 
B

B Lynn B

I think what you're looking for is:

ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]+" & z

I seem to recall reading in a numbe of posts here that the
reply-notification feature isn't working. You're not the only one.
 
D

David

Thank you very much B Lynn B.

I guess I have to wait and hear from an MVP about the e-mail alerts that are
failing.

Thanks,
--
David


B Lynn B said:
I think what you're looking for is:

ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]+" & z

I seem to recall reading in a numbe of posts here that the
reply-notification feature isn't working. You're not the only one.

David said:
Hello Group,

I have a formula that is added via code:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]"
and I would like to reatin the formula and add a constant to it. z=1
I tried:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z
but this failed. I am not sure how to accomplish adding the variable amount
and retaining the code.

Another unrelated question. I am having trouble getting responses to these
questions via e-mail alert. I have been into the preferences area and it
appears set up correctly. I have also checked the check box in this window. I
also click the "Notify me of relpies" in the main window where you start with
the "New" question, suggestion or comment. But I still fail to get an e-mail.

Thanks,
 
D

David

Hi Chip,

Thank you. The other worked also.

Can you help me with not being able to get an e-mail response? I think I
have checked all the things I need to check to be able to get a notification,
but I am still not.

Thanks,
--
David


Chip Pearson said:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z

should be

ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]+" & cstr(z)

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




Hello Group,

I have a formula that is added via code:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]"
and I would like to reatin the formula and add a constant to it. z=1
I tried:
ActiveCell.FormulaR1C1 = "=+RC[-1]+R[14]C[-1]" + z
but this failed. I am not sure how to accomplish adding the variable amount
and retaining the code.

Another unrelated question. I am having trouble getting responses to these
questions via e-mail alert. I have been into the preferences area and it
appears set up correctly. I have also checked the check box in this window. I
also click the "Notify me of relpies" in the main window where you start with
the "New" question, suggestion or comment. But I still fail to get an e-mail.

Thanks,
.
 
C

Chip Pearson

The web interface seems to have problems most if not all of the time.
I would recommend that you use a real news reader such as Forte Agent
or even Windows Mail a/k/a Outlook Express.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
 
D

David

Thanks for the information Chip.
--
David


Chip Pearson said:
The web interface seems to have problems most if not all of the time.
I would recommend that you use a real news reader such as Forte Agent
or even Windows Mail a/k/a Outlook Express.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




.
 

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