Average or "Harmonic Mean" calculation

C

Cydney

Excel has a "Harmonic Mean" calculation that I need to use in an Access
query. Is that possible? Formula in Excel is: =HARMEAN(R2:R28) I would like
to apply this formula to a column of numbers on my form.
 
J

Jeff Boyce

Cydney

If exporting your data to Excel and using its HARMEAN() function isn't a
possibility, you might be able to:

1. set a reference (open a module, select Tools|References, select the
Excel Object model)
2. create a function that returns all the numbers, loading up a list of
values
3. run the HARMEAN() function against the list of values

Regards

Jeff Boyce
<Office/Access MVP>
 
R

Rob Parker

Have a look at the reply from David Lloyd to a post "Normal Distribution" in
this newsgroup (less than 24 hours ago); it gives details on how to set up
an Access function to use an Excel function.

HTH,

Rob
 
C

Cydney

Thanks!!
What is the best way to gather all the numbers into the harmean phrase from
a query? I'll need it to say =harmean(36,63,84,24,35,58...). All of those
numbers are in the query and it only calculates the formula from the first
value it finds in the query.
 
Top