VBA判断某行某列是否为空
Sub IsEmpty()
Dim rowmax As Integer
Dim i As Integer
rowmax = Worksheets(1).UsedRange.Rows.Count '第一张工作表最大行
For i = 1 To rowmax
If WorksheetFunction.CountA(Rows(i)) <> 0 Then '判断是否为空行
check_L = "L" & i
value_L = Range(check_L).Value '判断L列是否为空行
If value_L <> "" Then
MsgBox i & "行" & value_L
End If
End If
Next i
End Sub