|
楼主 |
发表于 2018-6-8 14:03
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Private Sub CommandButton1_Click()
Dim i, Maxrow, a, arr, s
Maxrow = ActiveSheet.[A65536].End(xlUp).Row
arr1 = Range("A2:c" & Maxrow)
a = 2
For i = 2 To UBound(arr1, 1)
If Cells(i, 3) > 100000 Or Cells(i, 3) < 0 And Application.WorksheetFunction.CountIf(Sheet2.Range("a1:a10"), Cells(i, 2)) > 1 Then
Sheets("数据").[m1:O1] = Array("日期", "银行名称", "金额")
Sheets("数据").Cells(a, 13) = Sheets("数据").Cells(i, 1).Text
Sheets("数据").Cells(a, 14) = Sheets("数据").Cells(i, 2)
Sheets("数据").Cells(a, 15) = Sheets("数据").Cells(i, 3).Value
a = a + 1
End If
Next i
End Sub
涂颜色代码,我写的有问题吗?怎么结果全是比10万大的,不出现负数 |
|