|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 ykcbf1100 于 2024-12-20 08:38 编辑
参与一下。。。
- Sub ykcbf() '//2024.12.20
- Application.ScreenUpdating = False
- r = Cells(Rows.Count, 1).End(3).Row
- arr = [a1].Resize(r, 9).Value
- bt = [{"微信","支付宝","现金"}]
- [l2:n25] = ""
- zrr = [k2:n25].Value
- For i = 2 To UBound(arr)
- t = TimeValue(arr(i, 6))
- For x = 1 To UBound(zrr)
- b = Split(zrr(x, 1), "-")
- t1 = TimeValue(b(0))
- t2 = TimeValue(b(1))
- For k = 1 To UBound(bt)
- If InStr(arr(i, 7), bt(k)) Then n = k + 1
- Next
- If t >= t1 And t <= t2 Then
- zrr(x, n) = zrr(x, n) + Val(arr(i, 3))
- End If
- Next
- Next
- [k2:n25].Value = zrr
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|