|
- Sub yyyy()
- Dim arr, brr(), ar, r%, n%
- r = Range("a65536").End(3).Row
- arr = Range("a2:f" & r)
- ar = Array("建设银行", "苏宁银行", "农业银行")
- ReDim brr(1 To UBound(arr), 1 To 4)
- For Each kk In ar
- If kk = "建设银行" Or kk = "农业银行" Then
- For i = 1 To UBound(arr)
- If arr(i, 3) = kk Then
- n = n + 1
- brr(n, 1) = n
- brr(n, 2) = arr(i, 4)
- brr(n, 3) = arr(i, 2)
- brr(n, 4) = arr(i, 6)
- End If
- Next
- s = kk & "工资模板"
- With Sheets(s)
- .Cells(2, 1).Resize(n, 4) = brr
- End With
- n = 0
- End If
- If kk = "苏宁银行" Then
- For i = 1 To UBound(arr)
- If arr(i, 3) = kk Then
- n = n + 1
- brr(n, 1) = arr(i, 4)
- brr(n, 2) = arr(i, 2)
- brr(n, 3) = arr(i, 6)
- brr(n, 4) = "工资"
- End If
- Next
- s = kk & "工资模板"
- With Sheets(s)
- .Cells(2, 1).Resize(n, 4) = brr
- End With
- n = 0
- End If
- Next
- End Sub
复制代码 |
|