Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default MINIF function

Is it possible to create a MINIF UDF ?

I'm trying to create a UDF that finds the smallest number in a range
for a given criteria.

=MINIF(range_or_array_constant,criteria)

For example, =MINIF({0,1,2,3},"0") would return 1.

Any ideas ?


- Ronald K.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default MINIF function

Pls find the following (The use is linke SUMIF function)

Function MINIF(MyRange As Range, Criteria As String)

'The following line must be on single line
MINIF = Application.Evaluate("=MIN(IF(" & MyRange.Address & Criteria &
"," & MyRange.Address & "))")


End Function
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default MINIF function

Javed,

Thanks for the quick reply.

Is it possible to get this to work with an array constant in
addition to a range reference ?

For example, =MINIF({0,1,2,3},0)


- Ronald K.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default MINIF function

I am sorry.I Think it is beyond my knowledge.

I susupect it is beyond VBA.Shall be very eager to know if anyway is
there.
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
Is there any funcion like a @maxif or @minif? Just Anna Excel Worksheet Functions 7 September 29th 08 06:37 PM
minif Andes2U Excel Worksheet Functions 5 November 5th 07 02:43 PM
MINIF ???? Jock Excel Worksheet Functions 4 June 21st 07 12:34 PM
Minif / Maxif ? Thrain Excel Worksheet Functions 3 December 1st 05 10:14 AM
MINIF /MAXIF Or something similar kraljb Excel Discussion (Misc queries) 6 November 11th 05 11:06 PM


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