ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¨Ï¥ÎVBAµ{¦¡¦Û°Ê³]©w®æ¦¡¤Æ±ø¥óÅܦ¨µLªkÅܦâ

[µo°Ý] ¨Ï¥ÎVBAµ{¦¡¦Û°Ê³]©w®æ¦¡¤Æ±ø¥óÅܦ¨µLªkÅܦâ

¨Ï¥ÎVBAµ{¦¡¦Û°Ê³]©w®æ¦¡¤Æ±ø¥óÅܦ¨µLªkÅܦâ.

     ¨Ó·½½d³ò = "$" & "D" & "$" & ¼Æ¦r          '±a¤J¦¹ÅܼƳ]©w®æ¦¡¤Æ±ø¥óÅܦ¨µLªkÅܦâ
    Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
        Formula1:=(¨Ó·½½d³ò)                                                            '±a¤J¦¹ÅܼƳ]©w®æ¦¡¤Æ±ø¥óÅܦ¨µLªkÅܦâ
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Font
        .Color = -16383844
        .TintAndShade = 0
    End With
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .Color = 13551615
        .TintAndShade = 0
    End With
    Selection.FormatConditions(1).StopIfTrue = False

½Ð°Ý¦U¦ì¥ý¶i¬O¨º¸Ì¥X¿ù? ½Ð±z±Ð¾É,ÁÂÁÂ! ­ìª«®Æ¶q¤º±±ªí.rar (243.24 KB)

¦^´_ 1# kuan-007

¦³ªÅÀ°§Ú¸Õ¸Õ¬Ý¬O¤£¬O§A­nªº  ·PÁÂ

­ìª«®Æ¶q¤º±±ªí.rar (37.22 KB)

TOP

ÁöµM¤£¬O¥¿¸Ñ,¦ý¦h¾Ç¤@©Û,ÁÂÁ§A!

TOP

¥»©«³Ì«á¥Ñ °a¤ªºµ ©ó 2021-2-23 20:29 ½s¿è

¦^´_ 3# kuan-007

©êºp kuan-007¤j¤j  ¦pªG¦³¦h¾lªº®É¶¡ ¥i¥H§i¶D§Ú°ÝÃD¥X¦b­þ¸Ì¶Ü?  §Ú·Qª¾¹D§A­nªºµ²ªG ¦]¬°§Ú¤]¬O¶¶«K½m²ß §Æ±æ§Ú­Ì¥i¥H¤¬¬ÛÀ°§U ÁÂÁ§A

TOP

¦^´_ 1# kuan-007


¨Ó·½½d³ò = "$" & "D" & "$" & ¼Æ¦r
³o¬O¤å¦rÅܼÆ

­Y­n³]¦¨½d³òÅܼÆ
set ¨Ó·½½d³ò = Range("$" & "D" & "$" & ¼Æ¦r)
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¨Ó·½½d³ò = "$D$" & ¼Æ¦r
    With Cells(¼Æ¦r, ­^¤å).FormatConditions
         .Delete
         .Add Type:=xlCellValue, Operator:=xlGreater, Formula1:="=" & ¨Ó·½½d³ò  '¤j¤_
         .Parent.FormatConditions(1).Font.ColorIndex = 3
         .Parent.FormatConditions(1).Interior.ColorIndex = 6
         .Add Type:=xlCellValue, Operator:=xlEqual, Formula1:="=" & ¨Ó·½½d³ò  'µ¥¤_
         .Parent.FormatConditions(2).Font.ColorIndex = 5
         .Parent.FormatConditions(2).Interior.ColorIndex = 8
         .Add Type:=xlCellValue, Operator:=xlLess, Formula1:="=" & ¨Ó·½½d³ò   '¤p¤_
         .Parent.FormatConditions(3).Font.ColorIndex = 7
         .Parent.FormatConditions(3).Interior.ColorIndex = 10
    End With

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD