View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickCo7[_2_] NickCo7[_2_] is offline
external usenet poster
 
Posts: 1
Default Need help with a easy programming question


My maximum value looks like this.

Option Explicit
Option Base 1
Function MaxVal(DataArray)
Dim NumRows As Integer, NumCols As Integer
Dim i As Integer, j As Integer
MaxVal = DataArray(1, 1)
NumRows = DataArray.Rows.Count
NumCols = DataArray.Columns.Count
For i = 1 To NumRows
For j = 1 To NumCols
If DataArray(i, j) MaxVal Then
MaxVal = DataArray(i, j)
End If
Next j
Next i
End Function


--
NickCo7
------------------------------------------------------------------------
NickCo7's Profile: http://www.excelforum.com/member.php...o&userid=33341
View this thread: http://www.excelforum.com/showthread...hreadid=531733