Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help to Create Excel Function using VBA to analyze data

I am trying to create a function using Excel VBA that looks at each argument
and does validation of the argument to determine whether or not to include
the argument in the min function. The validation process should exclude
arguments that:

Argument = 0
Argument is text
Argument is an error

If the all the arguments fail the validation, it should return a text
message ie €śItem not bid€ť otherwise it should return the result of the min
value of the arguments that pass the validation process. Any help would be
much appreciated. I also want to create a function the works similar using
€śSmall€ť.

Thanks,

bob


Function MinPrice(ParamArray arglist() As Variant) As Double
For Each arg In arglist
MinPrice = WorksheetFunction.Min(arglist)
Next arg
End Function

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Help to Create Excel Function using VBA to analyze data

See your other post.

Bob K wrote:

I am trying to create a function using Excel VBA that looks at each argument
and does validation of the argument to determine whether or not to include
the argument in the min function. The validation process should exclude
arguments that:

Argument = 0
Argument is text
Argument is an error

If the all the arguments fail the validation, it should return a text
message ie €śItem not bid€ť otherwise it should return the result of the min
value of the arguments that pass the validation process. Any help would be
much appreciated. I also want to create a function the works similar using
€śSmall€ť.

Thanks,

bob

Function MinPrice(ParamArray arglist() As Variant) As Double
For Each arg In arglist
MinPrice = WorksheetFunction.Min(arglist)
Next arg
End Function


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help to Create Excel Function using VBA to analyze data

Dave

I can not find my previous post, so I reposted it again. I created a
function that provided me with the min value, but I am not sure how to write
the code to validate each of the arguements that flow through (agruement = 0,
arguement = text, arguement = error code. I am trying to teach myself VBA,
but I am very new to it. Any help would be much appreciated.

thanks,

bob k

"Dave Peterson" wrote:

See your other post.

Bob K wrote:

I am trying to create a function using Excel VBA that looks at each argument
and does validation of the argument to determine whether or not to include
the argument in the min function. The validation process should exclude
arguments that:

Argument = 0
Argument is text
Argument is an error

If the all the arguments fail the validation, it should return a text
message ie €œItem not bid€ otherwise it should return the result of the min
value of the arguments that pass the validation process. Any help would be
much appreciated. I also want to create a function the works similar using
€œSmall€.

Thanks,

bob

Function MinPrice(ParamArray arglist() As Variant) As Double
For Each arg In arglist
MinPrice = WorksheetFunction.Min(arglist)
Next arg
End Function


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help to Create Excel Function using VBA to analyze data

Dave

I found your orginal response. Thanks, I am going to test it now.

bob k

"Bob K" wrote:

Dave

I can not find my previous post, so I reposted it again. I created a
function that provided me with the min value, but I am not sure how to write
the code to validate each of the arguements that flow through (agruement = 0,
arguement = text, arguement = error code. I am trying to teach myself VBA,
but I am very new to it. Any help would be much appreciated.

thanks,

bob k

"Dave Peterson" wrote:

See your other post.

Bob K wrote:

I am trying to create a function using Excel VBA that looks at each argument
and does validation of the argument to determine whether or not to include
the argument in the min function. The validation process should exclude
arguments that:

Argument = 0
Argument is text
Argument is an error

If the all the arguments fail the validation, it should return a text
message ie €œItem not bid€ otherwise it should return the result of the min
value of the arguments that pass the validation process. Any help would be
much appreciated. I also want to create a function the works similar using
€œSmall€.

Thanks,

bob

Function MinPrice(ParamArray arglist() As Variant) As Double
For Each arg In arglist
MinPrice = WorksheetFunction.Min(arglist)
Next arg
End Function


--

Dave Peterson

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
sorting 2 colums of numbers and incremening them down blk&wht Excel Discussion (Misc queries) 10 October 9th 06 10:12 PM
Using "Find" function in Excel 2000, edit data without closing Fin rkgpihw Excel Discussion (Misc queries) 1 August 21st 06 07:39 PM
Does Excel 2000 have the "List" data function like in Excel 2003 Ted W. Excel Discussion (Misc queries) 1 August 3rd 06 06:58 PM
consolidation of tables in excel with text and figures samenvoegen van sheets Excel Worksheet Functions 8 March 2nd 06 03:27 PM
Can you use the validate function in a data form in Excel? Jolly Excel Worksheet Functions 0 December 12th 05 11:00 PM


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