- ©«¤l
- 199
- ¥DÃD
- 22
- ºëµØ
- 0
- ¿n¤À
- 233
- ÂI¦W
- 230
- §@·~¨t²Î
- Vista
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2020-4-14
- ³Ì«áµn¿ý
- 2024-11-28
|
¥»©«³Ì«á¥Ñ BV7BW ©ó 2021-7-24 17:28 ½s¿è
¦^´_ 20# ã´£³¡ªL
ÁÂÁ 㴣³¡ªL ¦Ñ®v
Ãö¤_"קï""³o³¡¥÷¤w§¹¦¨
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'µ{¦¡¸ê®Æ¨Ó·½¦Üã´£³¡ªL_1100624_X10000045_1
Dim R&, CN&, xE As Range
With Target
If .Column <> [P1].Column Or .Value = "" Then Exit Sub
R = Cells(Rows.Count, "k").End(3).Row
Cancel = True
If .Row = 1 Then
With Range("e1:n" & R)
.Borders.LineStyle = 1
.Columns(9) = .Columns(9).Value
End With
Range("h1:h" & R).Formula = "=IF(ROW(A1)=1,""(KG)"",IF(F1=""¥x¤ç"",(MOD(E1,1)*100/16+INT(E1)),E1)*G1)"
Else
Set xE = Range("K1:K" & R).Find(.Value, lookat:=xlWhole)
If xE Is Nothing Then MsgBox "¡¯§ä¤£¨ì«ü©wªº³æ¸¹¡I¡@": Exit Sub
CN = Application.CountIf(Range("K" & xE.Row & ":K" & R), .Value)
With Range("e" & xE.Row).Resize(CN, 10)
.Columns(9) = "=SUM(" & .Columns(4).Address & ")"
.BorderAround Weight:=xlMedium, ColorIndex:=3
.Item(1).Select
.Item(1).Font.Color = vbRed
End With
End If
End With
End Sub
...........
¦Ü©ó"¿é¤J"³o°l¥[³¡¥÷«h¬O»Ý¦A²£¥Í¥t¤@³æ¸¹.
¨Ò¦p:7¤ë24¤é¿é¤J¤F¤@±i¥X³f³æ, «È¤á:³¯¤@, ³æ¸¹:"1100724001", ¦@¿é¤J10µ§¶µ¥Ø,
7¤ë24¤éÁ{®É«È¤á:³¯¤@°l¥[¤F3ºØ°Ó«~,«h«È¤á:³¯¤@, ³æ¸¹:"1100724002", ¦@¿é¤J3µ§¶µ¥Ø,³o¤]§¹¦¨
......................
xNum = [V2] '³æ¸¹
cName = [E2] '«È¤á
'µ{¦¡¸ê®Æ¨Ó·½¦Üã´£³¡ªL_¥X³f§@·~Dª©V01_10905
If Not xNum Like String(10, "#") Then MsgBox "**³æ¸¹¿ù»~©ÎªÅ¥Õ! ": Exit Sub
If Left(xNum, 7) <> Year([E4]) - 1911 & Format([E4], "mmdd") Then MsgBox "**³æ¸¹«e¢¶½X»P¤é´Á¤£¬Û²Å! ": Exit Sub
Mch = Application.Match(xNum, [q³f©ú²Óªí!K:K], 0)
If IsNumeric(Mch) Then MsgBox "**³æ¸¹¤w¦s¦b! ": Exit Sub
'Mch = Application.Match(CL, [q³f©ú²Óªí!A:A], 0)
'If IsNumeric(Mch) Then MsgBox "**«È¤á¤w¦s¦b! ": Exit Sub
'µ{¦¡¸ê®Æ¨Ó·½¦Üã´£³¡ªL_2021_7_3«ü¾É
Mch = Application.Match(cName, [q³f©ú²Óªí!A:A], 0) 'Àˬd«È¤á¬O§_¦s¦b
If IsNumeric(Mch) Then
Beep 'Y¦s¦b, µo¥X¹ÍÁn, ¨Ã´£¥Ü¬O§_¶i¦æ¸É¼W???
If MsgBox("**«È¤á¤w¦s¦b! §AnÄ~Äò¿é¤J¥»±iq³æ¶Ü? ", 4 + 32 + 256) = vbNo Then Exit Sub '«ö"§_"µ²§ô
[E2] = [q³f©ú²Óªí!A:A].Cells(Mch, 1) '«ö"¬O", ¦Û°Ê¶ñ¤J"«È¤á¦W", ¥[¤J¼W¸É©ú²Ó~~
End If
...........................
²{¦b°ÝÃD©Ò¦b¬O¦]q³f©ú²Óªí¤¤
¨Ò)7¤ë1¤é«È¤á:³¯¤@, ³æ¸¹:"1100701001"¦@¿é¤J10µ§¶µ¥Ø
7¤ë1¤é«È¤á:³¯¤@Á{®É°l¥[, ³æ¸¹:"1100701002"¦@¿é¤J1µ§¶µ¥Ø
7¤ë2¤é«È¤á:³¯¤@, ³æ¸¹:"1100702001"¦@¿é¤J5µ§¶µ¥Ø
¦]Mch = Application.Match(cName, [q³f©ú²Óªí!A:A], 0) 'Àˬd«È¤á¬O§_¦s¦b.
("¨ä¥\¯à¬O¨¾¤î«È¤á«½Æ¿é¤J"³y¦¨"±ÄÁʻݨD"¥¢¯u)
©Ò¥H¥¦¬OÀˬd"q³f©ú²Óªí"¤¤¦³«È¤á:³¯¤@,³£·|¥ýÀˬd1¦¸.¨ä¥\¥Î¦]¦¹¥u¦³1¥b§@¥Î
¤]´N¬O»¡¥u¦³¨C¤ë²Ä1¦¸«È¤á:³¯¤@.©Î"q³f©ú²Óªí"¤¤¨S¦³«È¤á:³¯¤@¨ä¥\¥Î¤~¯à§e²{¥X
²{¦b°µªk¬O¦h1°Ê§@¥ý±N¨C¤é"q³f©ú²Óªí"¤â°Ê½Æ»s¥t1¤u§@ªí"q³f¦sÀÉ"¶K¤W«á±N"q³f©ú²Óªí"²MªÅ.
°ÝÃD´N¸Ñµ²¤F
¦]¦Ó´£°Ý"¤u§@ªí½Æ»s¸ó¥t¤@Àɮפu§@ªí"°ÝÃD
¦p¯à¦b"Mch = Application.Match(cName, [q³f©ú²Óªí!A:A], 0) 'Àˬd«È¤á¬O§_¦s¦b"¤¤
¥[¤W©Î§ï¬°¥H¤é´Á¨C¤é¥H«È¤á°µÀˬd¬J¥i.¤£¥Î¦A¼W¦C¥t¤@¤u§@ªí"q³f¦sÀÉ"ª½±µ¥H"q³f©ú²Óªí"§@¬°¦sÀɸê®Æ
¦b¨C¤ë¥Hq³f©ú²Óªí¤¤¸ê®Æ¦A¥t¦s·sÀɧ@¬°¾ú¥v¸ê®Æ¦sÀÉ
·PÁ 㴣³¡ªL ¦Ñ®v «ü¾É |
|