LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 8
Default Countif UDF???

Hello Experts,

I am trying to look for a UDF solution.

My worksheet setup: Range A1:J30000 is my randomly generated number
sequence (numbers 1-99). And L1:U5000 is my database of archived
sequences.

I have simplified the following worksheet setup so it's easier to
explain and hopefully easier to construct code for:

A B C D E F G H I J K_______L M N O P Q R S T U _______V
1 2 3 4 5 6 7 8 9 10 bad____1 2 3 4 5 6 30 31 32 33____TRUE
____________________________1 2 3 4 5 6 30 31 32 33____TRUE
____________________________1 2 3 4 5 6 7 31 32 33_____FALSE
____________________________1 2 3 4 5 6 30 31 32 33____TRUE


If I am testing the similarity of the randomly generated sequence A1:J1
to 4 archive sequences L1:U1 L2:U2 L3:U3 & L4:U4. I use the array
formulas.

Cell K1 =IF(OR(FALSE=V1:V4),"bad","useful")

Cell V1 =SUM(COUNTIF(L1:U1,$A$1:$J$1))<7
Cell V2 =SUM(COUNTIF(L2:U2,$A$1:$J$1))<7
Cell V3 =SUM(COUNTIF(L3:U3,$A$1:$J$1))<7
Cell V4 =SUM(COUNTIF(L4:U4,$A$1:$J$1))<7


I am trying to avoid the 2 step formula process. I would like the UDF
to automatically test each row in the range L1:U4 and return a
conclusion of it's findings. In others words to set the above formulas
up as one user-defined function in VBA and simply pass along the
necessary variables for VBA to handle.

Based on the above worksheet example, all I would need to enter is the
UDF in Cell K1

=UDFName(L1:U4,A1:J1,"<7") returns the result "bad"

PLEASE NOTE: 1) The UDF must be able to test other range dimensions.
2)The test criteria must be variable, hence I can enter it in the
function.


I have a large amounts of data on my worksheet, and I need to check
30,000 combinations and additional databases. Can anybody help me to
find a UDF solution? Any help you could give me would be gratefully be
appreciated.


Regards

James

 
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
countif Amanda Excel Worksheet Functions 10 January 16th 07 08:40 AM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


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