ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula + a variable (https://www.excelbanter.com/excel-programming/441503-formula-variable.html)

David

Formula + a variable
 
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,
--
David

Chip Pearson

Formula + a variable
 

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




On Fri, 9 Apr 2010 11:26:01 -0700, David
wrote:

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 Lynn B

Formula + a variable
 
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" wrote:

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,
--
David


David

Formula + a variable
 
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" wrote:

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" wrote:

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,
--
David


David

Formula + a variable
 
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" wrote:


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




On Fri, 9 Apr 2010 11:26:01 -0700, David
wrote:

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,

.


Chip Pearson

Formula + a variable
 
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



On Fri, 9 Apr 2010 14:16:01 -0700, David
wrote:

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

Formula + a variable
 
Thanks for the information Chip.
--
David


"Chip Pearson" wrote:

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



On Fri, 9 Apr 2010 14:16:01 -0700, David
wrote:

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,

.



All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com