Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default ActiveCell.Formula Help

Hi,

I have a String by name fieldtemp which is equal to A3,B3,D3,F5,J7 (and
so on along with the commas)
Now I want to insert a formula into a cell which is the average of the
values in A3,B3,D3,F5,J7 etc

I did the following:
ActiveCell.FormulaR1C1 = "=AVERAGE(fieldtemp)"

But instead of assigning the formula as
=Average(A3,B3,D3,F5,J7)
it does =Average(fieldtemp).
It does not seem to expand the value of fieldtemp. Please help. Thanks
in advance


Srikanth



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default ActiveCell.Formula Help

Hi
ActiveCell.FormulaR1C1 = "=AVERAGE(" & fieldtemp & ")"

--
Regards
Frank Kabel
Frankfurt, Germany


Srikanth Ganesan wrote:
Hi,

I have a String by name fieldtemp which is equal to A3,B3,D3,F5,J7
(and so on along with the commas)
Now I want to insert a formula into a cell which is the average of

the
values in A3,B3,D3,F5,J7 etc

I did the following:
ActiveCell.FormulaR1C1 = "=AVERAGE(fieldtemp)"

But instead of assigning the formula as
=Average(A3,B3,D3,F5,J7)
it does =Average(fieldtemp).
It does not seem to expand the value of fieldtemp. Please help.

Thanks
in advance


Srikanth



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
ActiveCell.Formula Matt P.[_2_] Excel Programming 2 August 29th 04 08:14 PM
ActiveCell.Formula Syntax Notorious_F.A.T Excel Programming 2 April 5th 04 10:15 AM
activecell.formula syntax Larry Levinson Excel Programming 4 December 23rd 03 01:33 PM
Formula with an ActiveCell Sok Hong Excel Programming 3 August 14th 03 08:24 AM


All times are GMT +1. The time now is 11:37 PM.

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"