¼ÐÃD:
[µo°Ý]
¨D§U~~¥ÎVBA»s§@¤@Ó¸ê®Æ´M§ä~¸ê®Æ·h²¾ªº¤èªk~~
[¥´¦L¥»¶]
§@ªÌ:
ji12345678
®É¶¡:
2012-5-13 18:56
¼ÐÃD:
¨D§U~~¥ÎVBA»s§@¤@Ó¸ê®Æ´M§ä~¸ê®Æ·h²¾ªº¤èªk~~
§Ú·Qn¥ÎVBA¼g¤@Ó ¾ú¦~¦¨ÁZ ªº¶×¤J¤u¨ã¡C
(1)n±q95¦~¤U¾Ç´Á´Á¤¤¦Ò¤u§@ªí ¶×¨ì«ü©wªºÀx¦s®æ¤º¡C
(2)¹³ ¼BP²W ¡F°²¦p§Ú¤£¤p¤ß¦b ¾ú¦~¦¨ÁZ ¤º«Ø¤F¨âÓ¼BP²Wªº¦W¤l¡A«h¨âµ§³£n¯à¶ñ¤J ¼BP²W¾ú¦~¦¨ÁZ¡C
(3)¦pªGµ{¦¡°õ¦æ§ä ¦¿²M©y ®É¡An¦³¤èªk ¯à¦^¶Ç¥¦ªº¦CªºÈ ¬°10 ¡C
(4)¥t¥~¤@Ó«ö¶s¥\¯à¬O~~¯à§â©Ò¦³«ÂЪº¦W¤l~Àx¦s®æÅܦ¨¬õ¦â©³¡C
(5)§Ú¥Ø«eªº¼gªk¬O¥Î¨âÓfor°j°é§ä¡A
(a) ¥ý¨ú¥X 95¦~¤U¾Ç´Á´Á¤¤¦Ò A3¤º¤H¦W¤ý¤p©ú-
(b)¦A¨ì¾ú¦~¦¨ÁZ¤º¥Îfor°j°é±qA3¡BA4¡BA5¡BA6¡K©¹¤U§ä¡A§ä¨ì¦A·h¸ê®Æ¡C
(C)¦A¨ú¥X 95¦~¤U¾Ç´Á´Á¤¤¦Ò A4¤º¤H¦W¾Gªü®S¡C
(D)¦A¨ì¾ú¦~¦¨ÁZ¤º¥Îfor°j°é±qA3¡BA4¡BA5¡BA6¡K©¹¤U§ä¡A§ä¨ì¦A·h¸ê®Æ¡C
´N¬O¥H«e¾Ç®Õ¾Çªº¨º®M
¦ý·í¸ê®Æ«Ü¤j®É¡Aµoı¥¦n¤@¨Ç®É¶¡¤~¶]§¹¡C
ı±o¨S®Ä²v
¬G¨D§U~~¦U¦ì¥ý¶i«ü¾É¦³µL¨ä¥L ¸û¦nªº~~~¤èªk¡A¥i¥H§ïµ½ ÁÂÁÂ~~~~·P®¦~~~~ ^^ ¡C
[attach]10933[/attach]
§@ªÌ:
register313
®É¶¡:
2012-5-13 19:04
¥»©«³Ì«á¥Ñ register313 ©ó 2012-5-13 23:04 ½s¿è
¦^´_
1#
ji12345678
µo°Ý¶·ª¾:
1.µo°ÝªÌ½Ð¤W¶ÇEXCELÀ£ÁYÀÉ(¤p¾Ç¥Í¤]¥i¥H)
2.°t¦XEXCELÀɽЧâ¥\¯à»¡©ú²M·¡
À°§U¦Û¤v!¤]µ¹µªÃDªÌ¤@Ó¤è«K!
Sub xx()
With Sheets("¾ú¦~¦¨ÁZ")
Set Rng = .Range("A3:A" & .[A65536].End(xlUp).Row)
Rng.Interior.ColorIndex = 0
For C = 2 To .[IV1].End(xlToLeft).Column
Sh = .Cells(1, C) & .Cells(2, C)
For S = 1 To Sheets.Count
If Sh = Sheets(S).Name Then
For Each A In Rng
X = Application.VLookup(A.Value, Sheets(Sh).[A3:B65536], 2, 0)
If Not IsError(X) Then A.Offset(0, C - 1).Value = X
If Application.CountIf(Rng, A) > 1 Then A.Interior.ColorIndex = 3
Next
End If
Next S
Next C
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
toxin
®É¶¡:
2012-5-15 13:06
¦^´_
2#
register313
register313¤j¤j
¥i¥H³Â·Ð¼g¤@¤Uµù¸Ñ¶Ü??
¤p§Ì¤]¦³»ÝnÃþ¦üªº¥\¯à
¦ý¬O¬Ý¤£¤ÓÀ´= =
·Ð½Ð©âªÅ.....
§@ªÌ:
register313
®É¶¡:
2012-5-15 14:52
¦^´_
3#
toxin
Sub xx()
'³]©w¥H¤U¦b¾ú¦~¦¨ÁZ¤u§@ªí¤§¤U¤u§@
With Sheets("¾ú¦~¦¨ÁZ")
'³]©w¾ú¦~¦¨ÁZ¤¤A3~AÄæ³Ì«á¤@¦C¬°Rng½d³ò
Set Rng = .Range("A3:A" & .[A65536].End(xlUp).Row)
'²M°£Rng½d³ò¤§©³¦â
Rng.Interior.ColorIndex = 0
'°j°é1:C=2~²Ä1¦C³Ì«á1Ä椧¦C¸¹(²Ä1¦C¦³Èªº½d³ò)
For C = 2 To .[IV1].End(xlToLeft).Column
'Sh=B1&B2,C1&C2,D1&D2(³]©w¾Ç¦~«×¾Ç´Á¦Ò¦¸¦WºÙ)
Sh = .Cells(1, C) & .Cells(2, C)
'°j°é2:S=1~³Ì«á¤@±i¤u§@ªí¤§¼Æ¶q
For S = 1 To Sheets.Count
'Y(¾Ç¦~«×¾Ç´Á¦Ò¦¸¦WºÙ)=(¤u§@ªí¦WºÙ)«h°õ¦æ°j°é3
If Sh = Sheets(S).Name Then
'°j°é3:A=A3~AÄæ³Ì«á¤@¦C¤§È
For Each A In Rng
'¬dA(©m¦W)¦b¬Û¹ï(¾Ç¦~«×¾Ç´Á¦Ò¦¸)¤u§@ªíA3~A65536¤§¦ì¸m,§ä¨ì«á¶Ç¦^²Ä2Ä椧È(¤À¼Æ)
X = Application.VLookup(A.Value, Sheets(Sh).[A3:B65536], 2, 0)
'Y¶Ç¦^È(¤À¼Æ)¤£¬O¿ù»~«hA(©m¦W)¦V¥k°¾²¾C-1Äæ«á¶ñ¤J¤À¼Æ
If Not IsError(X) Then A.Offset(0, C - 1).Value = X
'YA(©m¦W)¦bA3~AÄæ³Ì«á¤@¦C«ÂÐ¥X²{,«h¶ñ¤J¬õ¦â©³¦â
If Application.CountIf(Rng, A) > 1 Then A.Interior.ColorIndex = 3
Next
End If
Next S
Next C
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
toxin
®É¶¡:
2012-5-15 15:17
¦^´_
4#
register313
·PÁÂregister313¤j¤j©âªÅ¼gµù¸Ñ
¤p§Ì³o¨â¤Ñ¬ã¨s¤@¤U¦³°ÝÃD¦A³Â·Ð¤j¤j¤F
·P®¦
§@ªÌ:
ji12345678
®É¶¡:
2012-5-16 16:36
ÁÂÁ¦U¦ì¥ý¶i¼ö¤ß«ü±Ð¡A¨Ó¨ì³oùسoÓ½×ôίuªº¾Ç¨ì¦n¦h¡A·PÁÂ~~~¡C
§@ªÌ:
p6703
®É¶¡:
2012-5-17 00:17
ÂǵۦU¦ì´£°Ý¤Î°ª¤âªº¤£§[¸Ñµª¡AÅý¦³¤ß¾Ç²ßªº¯à´£¤É¦Û¤vEXCELªº¥\¤O¡A«Ü°ª¿³¯à¨Ó³o½×¾Â^^
§@ªÌ:
alumi
®É¶¡:
2012-5-17 13:28
·PÁ¤À¨É.
«ØijÅܼƦb¨Ï¥Î¤§«e, ¶i¦æ«Å§i.
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)