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

[µo°Ý] ·s¤âµo°Ý

[µo°Ý] ·s¤âµo°Ý

¥»©«³Ì«á¥Ñ s13983037 ©ó 2014-9-9 20:40 ½s¿è

¤p§Ì·Q½Ð±Ð¦U¦ì°ª¤â ¤@­Ó¤p°ÝÃD
¦p¹Ï¤¤©Ò¥Ü §Ú·QÅýA1­È ³o­Ó­È ©ÎC1 ³o­Ó­È ­«ÂЪº¸Ü ÃC¦â¤£¬°¬Û¦P
A1©ÎC1³o­Ó­È ¥u¬O¥Ü·N ¨Ã¤£ªí¥Ü¸ê®Æ¤¤ ³£¬OA1©ÎC1
¥Ñ©ó¼Æ¶q¥i¯à¦³¦n´X¦Êµ§¥H¤W ©Ò¥H...½Ð¤£­n±Ð§Ú¥Î³]©w®æ¦¡¤Æ
¦]¬°¨C¦¸²£¥Xªº­È³£¤£¦P ³Â·Ð¦U¦ì°ª¤â¤F..

¤p§Ì·Q½Ð±Ð¦U¦ì°ª¤â ¤@­Ó¤p°ÝÃD
¦p¹Ï¤¤©Ò¥Ü §Ú·QÅýA1­È ³o­Ó­È ©ÎC1 ³o­Ó­È ­«ÂЪº¸Ü ÃC¦â¤£¬°¬Û¦P
A1©Î ...
s13983037 µoªí©ó 2014-9-9 20:38
  1. Sub nn()
  2.   Dim lRow&
  3.   Dim vD
  4.   
  5.   Set vD = CreateObject("Scripting.Dictionary")
  6.   lRow = 1
  7.   Do While Cells(lRow, 1) <> ""
  8.     With Cells(lRow, 1)
  9.       If vD(CStr(.Value)) <> "" Then
  10.         .Interior.ColorIndex = 4
  11.       Else
  12.         vD(CStr(.Value)) = lRow
  13.       End If
  14.     End With
  15.     lRow = lRow + 1
  16.   Loop
  17. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ s13983037 ©ó 2014-9-9 23:51 ½s¿è
luhpro µoªí©ó 2014-9-9 23:30



luhpro ¤j¤j§A¦n §Ú·Q¥Î ....Interior.ColorIndex = x·í§@ÅÜ¼Æ ¨C·íµo²{¦P¤@Á`Ãþ¸ê®Æ­«½Æ¨Ï¥Î ¬õ¦â ¥t¤@ºØÃþ¥ÎÂŦ⠷|¤@ª½²Ö¥[Åܦ¨¦hºØÃC¦â
¤§Ãþªº ³o­Ó¥i¦æ¶Ü ¹Ï¦p¤U ¹ïVBA¤£¬Æ¤F¸Ñ ³Â·Ð¤j¤j¤F

ScreenShot00033.png

TOP

¦^´_ 2# luhpro


    luhpro ¤j¤j§A¦n §Ú·Q¥Î ....Interior.ColorIndex = x·í§@ÅÜ¼Æ ¨C·íµo²{¦P¤@Á`Ãþ¸ê®Æ­«½Æ¨Ï¥Î ¬õ¦â ¥t¤@ºØÃþ¥ÎÂŦ⠷|¤@ª½²Ö¥[Åܦ¨¦hºØÃC¦â
¤§Ãþªº ³o­Ó¥i¦æ¶Ü ¹Ï¦p¤U ¹ïVBA¤£¬Æ¤F¸Ñ ³Â·Ð¤j¤j¤F

ScreenShot00036.png (20.58 KB)

ScreenShot00036.png

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2014-9-10 22:24 ½s¿è
luhpro ¤j¤j§A¦n §Ú·Q¥Î ....Interior.ColorIndex = x·í§@ÅÜ¼Æ ¨C·íµo²{¦P¤@Á`Ãþ¸ê®Æ­«½Æ¨Ï¥Î ¬õ¦â ¥t ...
s13983037 µoªí©ó 2014-9-9 23:50

¤£«Øij.

­Y§A·Q³o¼Ë¥Î,
1. Excel VBA ªº ColorIndex ªº¼Æ­È¥»¨­¨Ã¤£³W«ß,
(¬Ý°_¨Ó¨Ã¤£¹³¬ORGB²`²L­ÈÅܰʶqªº²Õ¦X,¦Ó¹³¬O©T©wªºªº¬Y­Ó¦â­È»P§Ç¸¹ªº¹ïÀ³Ãö«Y, ©Ò¥H¤£®e©ö¥X²{§A©Òºc·Qªº¨ººØ®ÄªG)
¦³¥i¯à¥X²{¬Ý°_¨ÓÃC¦â®t¤£¦h,
¦ý¼Æ­È«o¤£¦Pªº±¡§Î.
2. ¦³©³¦â»P¤å¦rÃC¦â®t²§¹L¤p(¬Æ¦Ü¬Û¦P)¾É­P¤å¦r¤£©úÅ㪺°ÝÃD.

·íµM, ¦³­Ó RGB ¨ç¼Æ¥i¥H¹F¦¨·Q­nªº¦â½X²Õ¦X,
¨Ò¦p : [A1].Interior.Color=RGB(255,127,0)
¦ýÁÙ¬O·|¦³¤W­z 2. ©ÒÁ¿¨ìªº±¡§Î»Ý­n¦Ò¼{.

§Ú´¿¸g¤]¦³Ãþ¦üªººc«ä,
´N¬O¥Î¤£¦PªºÁä­È±a¤J¦P¤@­Ó¤½¦¡,
¨Ó¦Û°Ê²£¥Í¤£¦PªºÀx¦s®æ©³¦â»P¤å¦rÃC¦â²Õ¦X,
´Á±æ¯à«Ü¤è«Kªº°Ï§O¤£¦P¸s²Õªº¸ê®Æ.(¹w´Á¶W¹L50¸s¥H¤W)

¦ý­pºâµ²ªGÁ`¬O¤£¦p¹w´Á,
¦p©³¤U¹Ï§Î©Òªí²{¥X¨Óªº±¡§Î.


§Ú·Q¹L¤ñ¸û¥i¦æªº¤è¦¡¬O§Q¥ÎÃþ¦ü°}¦C¤§Ãþªºµ²ºcª½±µ³]¦nÀx¦s®æ©³¦â»P¤å¦rÃC¦â¨âªÌªº°t¹ï¦â­È.

TOP

¦^´_ 5# luhpro


    luhpro¤j¤j ·PÁ±zªº¸Ñ´b ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD