- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2021-3-15 23:23 ½s¿è
²Ä¤@¦¸µo©«,½Ð¦h¾á«Ý~
·Q½Ð°Ý,½d¨Ò²n¦p¤U,²Ä¤@ÄæÄÝ©ó®Æ¸¹,²Ä2ÄæÄÝ©óLOT,
³W«h´yz:®Æ¸¹¥i¥H¦³«Ü¦h¤£¦Pªº ...
luiroger µoªí©ó 2021-3-13 19:18
Dictionary «ü¥O¦b "³vÓ" (¤ñ¹ï ©Î ´M§ä) "¦h²Õ" (¬Û¦P ©Î ¬Û²§) ¸ê®Æ¤Wº¡¦n¥Îªº:- Sub nn()
- Dim lRow&
- Dim dLot, dRow
-
- [A1].CurrentRegion.Interior.ColorIndex = -4142 ' ²MªÅ©³¦â
- Set dLot = CreateObject("Scripting.Dictionary") ' ©w¸qnÀx¦s LOT ªº¦r¨å
- Set dRow = CreateObject("Scripting.Dictionary") ' ©w¸qnÀx¦s ¦C¸¹ ªº¦r¨å
- lRow = 2 ' ªì©l¦C¸¹
- While Cells(lRow, 1) <> "" ' °j°é¦Ü¸ê®Æ³Ì¥½
- With Cells(lRow, 1) ' ¥H A Ä欰¥DÅé
- If dLot.Exists(.Offset(, 1).Text) Then ' ¦pªG¤w¦³¬Û¦P LOT «h
- .Font.ColorIndex = 3 ' ¥»¦C A Äæ³]¬õ¦â
- .Offset(-lRow + dRow(.Offset(, 1).Text)).Font.ColorIndex = 3 ' ¤W¦¸¦P LOT ¦Cªº A Äæ³]¬õ¦â
- ' -lRow + dRow(.Text) ¬O¼W¶qpºâ¦C¸¹¦ì²¾§Þ¥©: .offset(-²{¦b¦C¸¹)=[A0], ¦A¥[¤W¤W¦¸Àx¦sªº¦C¸¹´N«ü¦V¤W¦¸¦P LOT AÄæÀx¦s®æ
- .Select ' ²¾°Ê¨ì¦P LOT AÄæÀx¦s®æ
- End If
- dLot(.Offset(, 1).Text) = .Text ' Àx¦s¦¹ LOT ¹ïÀ³ªº ®Æ¸¹, ¥H«K«áÄò¤ñ¹ï¬O§_¦³¬Û¦P LOT ¥X²{
- dRow(.Offset(, 1).Text) = lRow ' Àx¦s¦¹ LOT ªº¦C¸¹, ¥H«KY¤ñ¹ï¥X¬Û¦P LOT ®É,¥i¥H¤@¨Ö³]©w¬õ¦â
- End With
- lRow = lRow + 1 ' ¦C¸¹¥[ 1
- Wend
- End Sub
½Æ»s¥N½X
°ÝÃD-ans.zip (13.79 KB)
²z :
lRow = 2 ®É,
dLot("1") ¨S¸ê®Æ, ©Ò¥H If ¤º«ü¥O¤£°õ¦æ, «á±
dLot("1") = "A"
dRow("1") = 2 (©³¤U¤ñ·Ó¿ì²z)
ª½¨ì lRow = 12 ®É,
¦]¤§«e¤w³]©w dLot("1") = "A", ©Ò¥H If ¤º«ü¥O·|°õ¦æ:
[B12] »P [B2] ³£³]©w¬õ¦â, «á±
dLot("1") = "E"
dRow("1") = 12 (¾l²¤) |
|