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

[µo°Ý] ½Ð°Ý¦p¦ó³sµ²¨Ã½Æ»s¥~³¡¸ê®Æ

[µo°Ý] ½Ð°Ý¦p¦ó³sµ²¨Ã½Æ»s¥~³¡¸ê®Æ

¥»©«³Ì«á¥Ñ icefire722 ©ó 2011-11-3 10:36 ½s¿è

½Ð±Ð¦U¦ì¤j¤j¡A§Ú¦³«ü©w¥¨¶°µ¹«ö¶s¥h·j´M«ü©wÀx¦s®æ(B3)¿é¤Jªº¸ê®Æ¡A·j´M¤£¦P¤u§@ªí¸Ìªº¸ê®Æ¨ÃCOPY¨ì²Ä¤@­Ó¤u§@ªí¸Ì«ü©wªº«ü©wªºÀx¦s®æ
³o³¡¥÷¤p§Ì¦³¼g¥X¨Ó¡A·Q½Ð±Ð¦U¦ì¤j¤j¤@¨Ç°ÝÃD¡AÁٽФ£§[«ü±Ð
1. ¤u§@ªí(IQC¬d¸ß)³oÃä¡A¦pªG¦A¿é¤J·sªº­n¬d¸ß¸ê®Æªº­È¡A­ì¥»ªºÄæ¦ì¸ê®Æ·|³Q»\±¼¡A½Ð°Ý¦³¤°»ò¤èªk¸Ñ¨M?
2. ¦pªG­n±qÀx¦s®æ(B7&C7)ªº­È¦A¥h·j´M¨ä¥L¸ê®Æ§¨ùتºEXCELÀɮסA§ä¨ì²Å¦X¦r¦êªºÀɦW¨Ã½Æ»s«ü©wÀx¦s®æ¸Ìªº­È¨ì¤u§@ªí(IQC¬d¸ß)¬Û¦PÄæ¦ì¦WºÙ¸Ìªº­È?

½Ð¦U¦ì¤j¤j¬Ýªþ¥ó¸ê®Æ¡A¦]¬°­n·j´MªºÀɮצ³«Ü¦h¡A¤p§Ì¥ý©ñ´X­ÓÅý¦U¦ì¤j¤j¥i¥H°Ñ¦Ò


ÁÂÁÂ!

¸ê®Æ¬d¸ß.zip (409.25 KB)

¸ê®Æ¬d¸ß¸ê®Æ§¨

¥»©«³Ì«á¥Ñ luhpro ©ó 2011-11-3 21:55 ½s¿è
1. ¤u§@ªí(IQC¬d¸ß)³oÃä¡A¦pªG¦A¿é¤J·sªº­n¬d¸ß¸ê®Æªº­È¡A­ì¥»ªºÄæ¦ì¸ê®Æ·|³Q»\±¼¡A½Ð°Ý¦³¤°»ò¤èªk¸Ñ¨M?
icefire722 µoªí©ó 2011-11-2 19:42

­nÅý¥¦¤£Âл\«e¬d¸ê®Æªº¤èªk§Ú·Q¨ìªº¦³¨âºØ:
1. ¨C¦¸³£§ä³Ì«á¤@¦æ¸ê®Æ, µM«á·s¼W¨ì¨ä©³¤U¤@¦æ.(¬d¸ß¸ê®Æ¦C¸¹·|¤@ª½²Ö¥[¤U¥h)
  1. Sub DateButton_Click()

  2. Dim srcRange As Range, fndRange As Range
  3. Dim fstAddress As String, CurRow As Long
  4. Sheets("IQC¬d¸ß").Select
  5. Set srcRange = Sheets("¨C¤éIQC").Range("A19").CurrentRegion.Columns(3)
  6. Set fndRange = srcRange.Find(what:=Range("B3").Value)
  7. If Not fndRange Is Nothing Then
  8.     fstAddress = fndRange.Address
  9.     CurRow = Cells(7, 1).End(xlDown).Row + 1
  10.     Do
  11.         Cells(CurRow, 1).Value = fndRange.Offset(, -2).Value
  12.         Cells(CurRow, 2).Value = fndRange.Offset(, 0).Value
  13.         Cells(CurRow, 3).Value = fndRange.Offset(, 2).Value
  14.         Set fndRange = srcRange.FindNext(after:=fndRange)
  15.     Loop Until fndRange.Address = fstAddress
  16. Else
  17.     MsgBox "µL¦¹§å¸¹!!"
  18. End If
  19. End Sub
½Æ»s¥N½X
2. °O¿ý³Ì«á¤@¦C¦C¸¹, ¨C¦¸·s¼W«á±N¸Ó¦C¸¹¥[1.(¨C¦¸­«¶}ÀɦC¸¹·|­«·s±q²Ä7¦C¶}©l)
  1. Public CurRow As Long
  2. Option Explicit

  3. Sub DateButton_Click()
  4. Dim srcRange As Range, fndRange As Range
  5. Dim fstAddress As String
  6. CurRow = CurRow + 1 - (CurRow < 6) * 6
  7. Sheets("IQC¬d¸ß").Select
  8. Set srcRange = Sheets("¨C¤éIQC").Range("A19").CurrentRegion.Columns(3)
  9. Set fndRange = srcRange.Find(what:=Range("B3").Value)
  10. If Not fndRange Is Nothing Then
  11.     fstAddress = fndRange.Address
  12.     Do
  13.         Cells(CurRow, 1).Value = fndRange.Offset(, -2).Value
  14.         Cells(CurRow, 2).Value = fndRange.Offset(, 0).Value
  15.         Cells(CurRow, 3).Value = fndRange.Offset(, 2).Value
  16.         Set fndRange = srcRange.FindNext(after:=fndRange)
  17.     Loop Until fndRange.Address = fstAddress
  18. Else
  19.     MsgBox "µL¦¹§å¸¹!!"
  20. End If

  21. End Sub
½Æ»s¥N½X
¬Ý¬Ý¬O§_²Å¦X§Aªº»Ý¨D.

ÃD¥~¸Ü :
­Y»Ý­n¥ÎÅܼƨӦs©ñ¦C¸¹¥H«K¨Ï¥Î®É¤£«Øij¥Î Integer ,
¦]¬°¥¦¥u¯à¦s¨ì 32767 ,
¶ZÂ÷ª© Excel ªº³Ì¤j¦C¸¹ 65536 ¬O¤£°÷¥Îªº.

TOP

¦^´_ 2# luhpro


    ·PÁ¤j¤j¡A¤p§Ì¸Õ¸Õ¬Ý¡A¦p¦³¤£À´ªº¦a¤è¦A¸ò¤j¤j½Ð±Ð

ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD