|
楼主 |
发表于 2014-10-19 23:41
|
显示全部楼层
dsmch 发表于 2014-10-19 20:36
原代码太啰嗦了,如果有90项,莫非要全部列举?
Sub test()
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If Application.CountA(Union("a" & Rows, "b" & Rows, "f" & Rows)) <> 3 Then
Range("b" & i).Select
MsgBox "统计单位,被使用林地单位,林班大班小班及面积,使用林地类型,建档,现状" & Chr(10) & "9项数据不能为空,请检查数据!"
End If
Next
End Sub
怎么提示类型不匹配?如何根据属性查找获得列号?
|
|