Excel 比大小

Function test(aa As Range, bb As Range, cc As Range)
Dim str

If aa.Value > bb.Value Then
 str = aa.Value
    
If str > cc.Value Then
        test 
= str
    
Else
        test 
= cc.Value
    
End If

Else
 str = bb.Value
   
If str > cc.Value Then
       test 
= str
    
Else
       test 
= cc.Value
   
End If

End If

End Function

注意的是要放在模块里,然后做为函数来调用

原文地址:https://www.cnblogs.com/Ewin/p/1257601.html