|
-
Nov 27th, 2009, 01:43 PM
#1
Thread Starter
Addicted Member
[RESOLVED] max and min
if i have vaue in celll 17.09,18,03,14,05,14.03
i want to get min value ie 14.05
and max value 18.03
the below code shows min and max after deceimal point
For i = 1 To 4
myarray(i) = Cells(i, 1).Value
myarray2(i) = Cells(i, 1).Value
Next i
MsgBox "Max = " & Application.WorksheetFunction.Max(myarray)
Cells(1, 2).Value = Application.WorksheetFunction.Max(myarray)
MsgBox "Min= " & WorksheetFunction.Min(myarray2)
Cells(1, 3).Value = WorksheetFunction.Min(myarray2)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|