|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
代码还需加些判断,没时间修改了,你自己先参考:
- Sub 初中在外寄读花名册()
- Dim brr(1 To 10000, 1 To 12)
- arr = Sheet3.UsedRange
- m = 0
- For i = 7 To UBound(arr) Step 2
- If Len(arr(i, 19)) And (InStr(arr(i, 19), "安顺") = 0 Or InStr(arr(i, 19), "镇宁") = 0 Or InStr(arr(i, 19), "丁旗") = 0) Then
- m = m + 1
- brr(m, 1) = m
- brr(m, 2) = arr(i, 1)
- brr(m, 3) = arr(i, 2)
- For j = 4 To 7
- brr(m, j) = arr(i, j)
- Next
- brr(m, 9) = arr(6, 19) & "/" & arr(6, 20) & "/" & arr(6, 21)
- brr(m, 10) = arr(i + 1, 19)
- brr(m, 11) = arr(i, 19)
- End If
- Next
- If m Then
- Range("a6:l" & Rows.Count).ClearContents
- [a6].Resize(m, 12) = brr
- End If
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|