- ©«¤l
- 51
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 77
- ÂI¦W
- 0
- §@·~¨t²Î
- windows xp sp3
- ³nÅ骩¥»
- excel 2003 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2023-10-31
|
¦^´_ 5# yuch8663
½Ð°Ýluhpro ¼Ó¥D¡A§Ú°Ñ¬ãÀÀªº°µªk±N¤ÀÃþ¼Ð·Ç§ó§ï¬°¥t¤@Ӱ϶ô°µ°Ñ·Ó¡A·|¦b¤U¦C¬õ¦r°Ï¥X²{¿ù»~¡A½Ð°Ý¬O¦óì¦]?
Sub Color2() 'luhpro ¼Ó¥D«ü¾É
'¤Wzªº±¡§Î¥i¥H§Q¥Î Switch »P Choose ¨âÓ¨ç¼Æ¨Ó¤j´T²¤Æµ{¦¡,'
'¥H¤U¶È¦C¥X²Ä¤@¤p¬qªºµ{¦¡,¨ä¾l¶È»ÝÅܧó¬ÛÃö¼Æ¦r«á¦A®M¥Î¤W¥h§Y¥i.
Dim iRng%, F As Variant
With ThisWorkbook.Sheets("sheet3")
For Each F In .Range("b35:p46")
iRng = Switch(F >= 0.06, 1, F >= 0.04 And F < 0.06, 2, F >= 0.02 And F < 0.04, 3, _
F > 0 And F < 0.02, 4, F = 0, 5, F < 0 And F > -0.02, 6, _
, F <= -0.02 And F > -0.04, 7, F <= -0.04 And F > -0.06, 8, F <= -0.06, 9) F.Offset(-30, 0).Interior.ColorIndex = Choose(iRng, 3, 46, 22, 40, -4142, 15, 43, 50, 10)
F.Offset(-30, 0).Font.ColorIndex = Choose(iRng, 2, 2, 2, 1, 1, 1, 44, 44, 44)
F.Offset(-30, 0).Font.Bold = Choose(iRng, True, True, True, False, False, False, True, True, True)
Next '
End With
End Sub
Book1.rar (20.33 KB)
|
|