Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
imej-clavier
 
Posts: n/a
Default Formula in Visual Basic For Excel

Hello,
This is my problem :
How can I calculate with Visual Basic For Excel the result of the following
function :
X = (a1 - ma)^2 + (a2 - ma)^2 + ... + (aN - ma)^2
1,2, ...,N are indexes
N is known
ma is the average of the different notes(a1,a2,...,aN) and is fixed.
X is the result I search.
The value of a1,... is not fixed and evoluate in conjunction with the
indexes.

How can I do to find the result. Must I use a personalized function ?

Thank you in advance,


Jean-michel


  #2   Report Post  
Jim Cone
 
Posts: n/a
Default

Jean-michel,

Are a1, a2 ... cell references or are they a product of... a * 1, a * 2,... a * n ?

Regards,
Jim Cone
San Francisco, CA

"imej-clavier" wrote in message
...
Hello,
This is my problem :
How can I calculate with Visual Basic For Excel the result of the following
function :
X = (a1 - ma)^2 + (a2 - ma)^2 + ... + (aN - ma)^2
1,2, ...,N are indexes
N is known
ma is the average of the different notes(a1,a2,...,aN) and is fixed.
X is the result I search.
The value of a1,... is not fixed and evoluate in conjunction with the
indexes.
How can I do to find the result. Must I use a personalized function ?
Thank you in advance,
Jean-michel


  #3   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

You can call the worksheet function DEVSQ from VBA as
Application.DevSq()
in all Excel versions that support VBA, or as
WorksheetFunction.DevSq()
in Excel 97 or later. The WorksheetFunction. prefix will pull up a list
of worksheet functions that are supported in VBA.

Jerry

imej-clavier wrote:

Hello,
This is my problem :
How can I calculate with Visual Basic For Excel the result of the following
function :
X = (a1 - ma)^2 + (a2 - ma)^2 + ... + (aN - ma)^2
1,2, ...,N are indexes
N is known
ma is the average of the different notes(a1,a2,...,aN) and is fixed.
X is the result I search.
The value of a1,... is not fixed and evoluate in conjunction with the
indexes.

How can I do to find the result. Must I use a personalized function ?

Thank you in advance,


Jean-michel


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
Visual Basic System Error-Userform GENEF Excel Discussion (Misc queries) 1 December 22nd 04 05:05 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM
I want the results of a formula to show in cell, NOT THE FORMULA! ocbecky Excel Discussion (Misc queries) 4 December 10th 04 08:39 PM
Visual Basic Help Duncan Smith Excel Discussion (Misc queries) 1 December 3rd 04 09:13 AM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM


All times are GMT +1. The time now is 07:12 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"