我需要 Excel 帮助。我的问题是:如何在此循环中获取每行的单元格 42?作为:
For Each r In Sheets("Sheet2").UsedRange.Rows
sval = r.Cells(42)
If sval = "" Then
If r.Cells(6).Value <> "" And r.Cells(7).Value <> "" And r.Cells(9).Value <> "" And r.Cells(10).Value <> "" And r.Cells(11).Value <> "" And r.Cells(12).Value <> "" Then
MsgBox "wtehi"
r.EntireRow.Interior.ColorIndex = 0
Else
MsgBox "yallow"
emptyMand = "ok"
r.EntireRow.Interior.ColorIndex = 6
End If
End If
Next