|
功能:将Excel单元格中的字变七彩
使用方法:快捷键:Ctrl+Y
安装方法:将文件解压后置于以下文件夹:
OFFICE 2007:
C:\Program Files\Microsoft Office\Office12\STARTUP
OFFICE 2003:
C:\Program Files\Microsoft Office\Office11\STARTUP
代码如下:
Sub Q()
Dim cell As Range, lens, temp As Byte
For Each cell In Selection
If VBA.IsNumeric(cell) Then cell = "'" & cell.Text
For lens = 1 To Len(cell)
temp = IIf((lens Mod 7) > 3, 3, 2) + ((lens - 1) Mod 7) + 1 - (lens Mod 7 = 0)
cell.Characters(Start:=lens, Length:=1).Font.ColorIndex = temp
Next lens
Next cell
End Sub
工具下载
:
[ 本帖最后由 godfrey0207 于 2009-1-5 10:27 编辑 ] |
评分
-
查看全部评分
|