- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¦^´_ 1# l020330320
·j´M³t«×n§Ö¥i¥H§Q¥Î°}¦C¨Ó§ä³t«×·|§Ö«Ü¦hªº¡I¤U±¥N½Xµ¹§A°Ñ¦Ò¡I- Private Sub CommandButton4_Click() '¿é¤J¤u¥d¸¹½X
- Dim a As String, cardnumber As String
- Dim arr2()
- Application.ScreenUpdating = False
- cardnumber = InputBox("½Ð¿é¤J¤u¥d¸¹½X(«Øij¨Ï¥Î±ø½X¾¹)")
- i = 9
- x = 1
- arr = Sheets("¸ê®Æ®w").Range("a2:bj" & Sheets("¸ê®Æ®w").Cells(Rows.Count, 2).End(xlUp).Row)
- For j = 1 To UBound(arr, 1)
- If arr(j, 2) = cardnumber Then
- ReDim Preserve arr2(1 To 42, 1 To x)
- arr1 = Application.Transpose(Application.Index(arr, j, 0))
- For s = 1 To 42
- arr2(s, x) = Application.Transpose(arr1(s, 1))
- Next
- x = x + 1
- End If
- Next
- [a2] = cardnumber
- [b9].Resize(UBound(arr2, 2), UBound(arr2, 1)) = Application.Transpose(arr2)
- 'Sheets("¸ê®Æ®w").Activate
- 'a = Application.WorksheetFunction.Match(CDbl(cardnumber), Sheets("¸ê®Æ®w").[B:B], 0) '³]©w¸ê®Æ®w¸ÌªºBÄæ·j´Mµ²ªG¬°a
- 'If a = "0" Then
- ' MsgBox "¥¼·j´M¨ì±z©Ò¿é¤Jªº¤u¥d¸¹½X¡A½Ð½T»{¸ê®Æ¨Ó·½µL»~¡C"
- ' Sheets("µn¿ý").Select
- ' Exit Sub
- 'Else
- ' Sheets("µn¿ý").Range("A2") = cardnumber
- ' firstAddress = Cells(a, 2).Address
- '
- ' Do
- ' Sheets("¸ê®Æ®w").Select
- ' ActiveSheet.Range(ActiveSheet.Cells(a, 1), ActiveSheet.Cells(a, 62)).Select '¿ï¾Ü¨Ã½Æ»sÄæ¦ì
- ' Selection.Copy
- '
- ' Sheets("µn¿ý").Select
- ' '¦pªG§P©wBÄæCÄæ¤ÎKÄæ³£¬°ªÅȪº¸Ü«h¶K¤W
- ' If (ActiveSheet.Cells(i, 2) = "" And ActiveSheet.Cells(i, 3) = "" And ActiveSheet.Cells(i, 6) = "") Then
- ' ActiveSheet.Cells(i, 2).Select
- ' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
- ' Application.CutCopyMode = False
- '
- ' Sheets("¸ê®Æ®w").Select
- '
- ' 'a = a.Nextmatch()
- ' secondAddress = Cells(a, 2).Address '§PÂ_ADDRESS«á¿ï¨ú½Æ»sÄæ¦ì
- ' Else
- ' End If
- ' i = i + 1
- '
- ' Loop While secondAddress <> firstAddress
- ' Sheets("µn¿ý").Select
- '
- 'End If
- Range("K9") = "=G7"
- Range("K10") = "=H7"
- Range("K11") = "=I7"
- Range("K12") = "=J7"
- Range("K13") = "=K7"
- Range("K14") = "=L7"
- Range("K15") = "=M7"
- Range("K16") = "=N7"
- Range("K17") = "=O7"
- Range("K18") = "=P7"
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|