Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default counting elements of two arrays

Thank you Joel I will try that.

Kind regards
Geoff

On Aug 23, 2:52 pm, Joel wrote:
If you want to try using countif 0 which will get the non-blank dates it
requires only one line change. This method doesn't look at bad data, just
cares if there is data or is'nt data.

chage from:
corelval = WorksheetFunction.Correl(corelarray,
colarray)
change to:
corelval = WorksheetFunction.Countif(corelarray,
"0")

If ArrayCount(colarray) ArrayCount(corelarray) * 0.1
Then

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''*'''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''
corelval = WorksheetFunction.Correl(corelarray,
colarray)
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''*'''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''
If Abs(corelval) coreltest Then
colave = WorksheetFunction.Average(colarray)
colsd = WorksheetFunction.StDev(colarray)
rsltcount = rsltcount + 1
rsltarray(rsltcount, 1) = Cells(1, c + 1)
rsltarray(rsltcount, 2) = Cells(2, c + 1)
rsltarray(rsltcount, 3) = colave
rsltarray(rsltcount, 4) = colsd
rsltarray(rsltcount, 5) = colsd / colave * 100
rsltarray(rsltcount, 6) = corelval
rsltarray(rsltcount, 7) = corelval * corelval
rsltarray(rsltcount, 8) =
WorksheetFunction.Count(colarray)
End If
End If
Next c


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
Counting the Number of Elements in an Array Confused_in_Houston[_2_] Excel Discussion (Misc queries) 3 October 1st 08 11:05 PM
Elements and Arrays in Excel Lighthouseman Excel Worksheet Functions 6 February 1st 06 10:06 AM
Counting Elements in a String carl Excel Worksheet Functions 2 December 31st 04 02:16 PM
counting column elements Daniel Pena Excel Programming 2 February 3rd 04 05:35 PM
comparing elements from 2 arrays using VBA code lopsided Excel Programming 3 September 23rd 03 04:34 PM


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