excel中怎么按字体彩色提取?
制作一个VB程序来解决: Sub tqhs()Dim Myr%, x%, n%, aa, y%, col%, Myc%Application.ScreenUpdating = FalseMyr = [a65536].End(xlUp).RowFor x =
1 To Myr col =
2 aa = Len(Cells(x, 1)) For y = 1 To aa If Cells(x, 1).Characters(y, 1).Font.ColorIndex =
3 Then n = 1 Cells(x, col) = Cells(x, col) & Cells(x, 1).Characters(y, 1).Text ElseIf n = 1 Then col = col + 1: n = 0 End If Next yNext xMyc = [a1].CurrentRegion.Columns.CountRange(Cells(1, 2), Cells(Myr, Myc)).Font.ColorIndex = 3Application.ScreenUpdating = TrueEnd Sub
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有