Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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,

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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,

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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,

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
variable formula LP23294 Excel Worksheet Functions 4 October 27th 09 07:46 PM
Variable within a formula Eric[_20_] Excel Programming 9 March 29th 08 08:55 PM
DDE formula with variable Bruce Excel Worksheet Functions 0 November 16th 07 09:03 AM
Using a variable in a formula [email protected] Excel Discussion (Misc queries) 1 December 29th 06 11:46 AM
formula containing a formula-dependent variable - how? CompeterN New Users to Excel 1 November 8th 06 02:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"