Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find min value 1

Status
Not open for further replies.

ersatz

Programmer
Oct 29, 2002
114
US
Hi,
I need an algorithm to find min data from an array.
Can somebody help me, please?
Thanks in advance
ersatz
 
You didn't mention the type of array.

If your array is in a range of cells, then you could simply use the =MIN function.

If your array is an "array constant" - i.e. NOT in cells, then I'm sure others can help. I don't happen to be "up" on the use of array constants.

Hope this helps. :) Please advise as to how you make out.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
function MinArrVal()
minVal = arrayName(0)
for i = 0 to ubound(arrayName())
if arrayName(i)<minVal then
minVal = arrayName(i)
else
end if
next i
MinarrVal = minVal
end function

Your array would need to be &quot;Public&quot; for this to work as a function Rgds
~Geoff~
 
Hi Geoff,
It's work grate.
Thank you very much
ersatz
 
ersatz,

Pssssssssssssssst. ...the &quot;proper&quot; way of showing appreciation to Geoff, is to &quot;award him a STAR&quot;.

This is done by simply clicking on the &quot;*Mark this post as a helpful/expert post!&quot; - located in the lower-left-corner of the contributor's posting.

Being relatively new to Tek-Tips, I'm sure you weren't yet aware of this accepted method of showing appreciation.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top