LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 200
Default vba arrays, count blank cells

matt wrote:
I am trying to write a harmonic mean function that will evaluate a set
of numbers, even if there are negative or zero values.

The harmonic mean formula is the count of numbers in the data set
divided by the sum of 1/n. The excel function is =harmean(). For
example, the data set 5, 7, 4, 10, 11, 15, 12 yields a harmonic mean of
7.497...( 7 / (1/5+1/7+1/4+1/10+1/11+1/15+1/12)). This formula does
NOT work if their is a zero OR negative number in the set.

I have written code that will evaluate the numbers, but my question is
whether or not their is a way to count the blank/text/empty cells in an
array?


If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook

=ArrayCount(arr) - ArrayCountIf(arr, 0, "")

Alan Beban
 
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
how to count#cells w/= value in other column and not count blank c aganoe Excel Worksheet Functions 4 April 9th 10 11:36 AM
Count from Blank & Non-Blank Cells Mandeep Dhami Excel Discussion (Misc queries) 4 February 12th 08 03:25 PM
Count the non blank cells vijaydsk1970 Excel Worksheet Functions 1 November 9th 06 02:25 PM
Help getting count of non-blank cells Casey Excel Discussion (Misc queries) 3 May 18th 06 02:31 PM
Count of non-blank cells. EWill Excel Programming 1 October 1st 03 10:50 PM


All times are GMT +1. The time now is 09:13 AM.

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

About Us

"It's about Microsoft Excel"