|
二楼的代码好像有点小问题,修改了一下。- Sub test()
- Application.ScreenUpdating = False
- Dim arr, m%, n%, k%
- For m = 2 To Cells(Rows.Count, "a").End(xlUp).Row
- arr = Split(Cells(m, 2), Chr(10))
- For n = LBound(arr) To UBound(arr)
- If arr(n) Like "*结清*" Then
- Cells(m, 2).Characters(Start:=k, Length:=Len(arr(n)) + 1).Font.Strikethrough = True
- Cells(m, 2).Characters(Start:=k, Length:=Len(arr(n)) + 1).Font.Color = -16776961
- k = k + Len(arr(n)) + 1
- Else
- k = k + Len(arr(n)) + 1
- End If
-
- Next
- k = 0
- Next
- Application.ScreenUpdating = True
- MsgBox "Done"
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|