Function DDMAX(ParamArray A() As Variant) As Single
Dim i As Long
Dim S As Single
S = 0
For i = 0 To UBound(A, 1)
If IsNumeric(A(i)) = True Then
If A(i) > S Then
S = A(i)
End If
End If
Next
DDmax = S
End Function
把此代码复制到模块中。然后在查询中直接当公式用。
按你上面数据示例:
DDMAX(字段1,字段2.。。。)
DDMAX([1月],[2月],.....)