Excel MIN Function in Access

G

GBAccess

I found this posting that worked very well for me, but I need to make an
adjustment to it and just can't think how to do it. Can someone please help
out?

Thanks


I Love This!!!

I also need to do the inverse, find the minimum value. I thought I could
make the adjustment myself, but I guess I'm brain-dead today. Can you advise
 
D

Dirk Goldgar

GBAccess said:
I found this posting that worked very well for me, but I need to make an
adjustment to it and just can't think how to do it. Can someone please
help
out?

Thanks


I Love This!!!

I also need to do the inverse, find the minimum value. I thought I could
make the adjustment myself, but I guess I'm brain-dead today. Can you
advise


Untested, but how about:

'------ start of code ------
Function MyMin(ParamArray Values()) As Variant

Dim intLoop As Integer
Dim varMin As Variant

If IsMissing(Values) Then
MyMin = Null
Else
For intLoop = LBound(Values) To UBound(Values)
If varMin > Values(intLoop) Then
varMin = Values(intLoop)
End If
Next intLoop
MyMin = varMin
End If

End Function
'------ end of code ------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top