|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
参与一下。。。
- Sub ykcbf() '//2024.8.23
- With Sheets("Sheet1")
- r = .Cells(Rows.Count, 2).End(3).Row
- .[c2:c10000] = ""
- arr = .[a1].Resize(r, 3)
- On Error Resume Next
- For i = 2 To UBound(arr)
- If arr(i, 2) = Empty Then
- ft = 0
- Else
- If InStr(arr(i, 2), ",") Then
- st = Split(arr(i, 2), ",")
- If Val(arr(i, 1)) = UBound(st) Then
- ft = 1
- Else
- ft = 0
- End If
- Else
- If Val(arr(i, 1)) = 1 Then
- ft = 1
- Else
- ft = 0
- End If
- End If
- End If
- If ft = 1 Then arr(i, 3) = "用量正确" Else arr(i, 3) = "错误"
- Next i
- .[c1].Resize(r, 1) = Application.Index(arr, 0, 3)
- End With
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|