2,462
社区成员
发帖
与我相关
我的任务
分享
If Worksheets(Sheet1).cell(1, 1).Value > Worksheets(Sheet1).cell(1, 2).Value Then
MsgBox "first bigger"
Else
MsgBox "second bigger"
End If
If Worksheets("Sheet1").Cells(1, 1).Value > Worksheets("Sheet1").Cells(1, 2).Value Then
MsgBox "first bigger"
Else
MsgBox "second bigger"
End If
'Worksheets() 括号里请填工作表的索引序号或名字,索引序号为数字,名字请加上引号
'Cell -> Cells
'都是小问题,请学会查看EXCEL VBA的帮助文档
'注意每个单元格的值的数据类型