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

 

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

 

posted @ 2008-07-31 20:35  Ewin  阅读(443)  评论(0编辑  收藏  举报