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

[µo°Ý] ½Ð°Ý¦p¦ó¼¶¼gVBA¡A¨Ï¦³­ÈªºÄæ¦ì½Æ»s¨ì¯S©w¤u§@ªí¥B·sªº¸ê®ÆÂмg(¤w¸Ñ¨M)

[µo°Ý] ½Ð°Ý¦p¦ó¼¶¼gVBA¡A¨Ï¦³­ÈªºÄæ¦ì½Æ»s¨ì¯S©w¤u§@ªí¥B·sªº¸ê®ÆÂмg(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ sax868 ©ó 2012-5-24 10:28 ½s¿è

Book11.zip (17.04 KB)
  1. Sub Macro6()
  2. '
  3. '
  4.     Sheets("Updated Data").Select
  5.     Range("BC2").Select
  6.     ActiveCell.FormulaR1C1 = "=IF(RC[-13]=RC[-1],1,0)"
  7.     Range("BC2").Select
  8.     Selection.Copy
  9.     Range("BC3").Select
  10.     Range(Selection, Selection.End(xlDown)).Select
  11.     ActiveSheet.Paste
  12.     Cells.Select
  13.     Application.CutCopyMode = False
  14.     Selection.AutoFilter
  15.     ActiveSheet.Range("$A$1:$BC$491").AutoFilter Field:=55, Criteria1:="0"
  16.     ActiveWindow.SmallScroll Down:=-6
  17.     Range("A6:BB9").Select
  18.     Selection.Copy
  19.     Sheets("Notes").Select
  20.     ActiveWindow.SmallScroll Down:=-3
  21.     Range("A2").Select
  22.     ActiveSheet.Paste
  23.     Columns("BC:BC").Select
  24.     Application.CutCopyMode = False
  25.     Selection.ClearContents
  26.     Sheets("Updated Data").Select
  27.     Columns("BC:BC").Select
  28.     Selection.ClearContents
  29.     ActiveSheet.ShowAllData
  30.     Selection.AutoFilter
  31.     Range("A1").Select
  32.     ActiveWorkbook.Save
  33. End Sub
½Æ»s¥N½X
¦U¦ì¤j¤j¤È¦w¡G

½Ð°Ý¦p¦ó¼¶¼gVBA¡A±N¦³Updated Data¤u§@ªí¸ÌAPÄæ¤ÎBBÄ榳­Èªº¾ã¦æ½Æ»s¨Ã¦s¨ìNotes¤u§@ªí¸Ì¡H¤SNotes¤u§@ªí¦³¦p¸ê®Æ®w¯ë, ­Õ­YUpdated Data¸Ìªº¸ê®ÆNotes¹J¨ì­«½Æªº¡A«h·|¥H·sªº¸ê®Æ¬°¥D¡A§Y±N¦³APÄæ¤ÎBBÄ榳­Èªº¾ã¦æ½Æ»sÀx¦s¨ìNotes¤u§@ªí¸Ì¨ÃÂмg»\¹L¥h¡C
¥Ø«e§Ú¥u¯à¤â°Ê¥ý¥Î=IF(AP2=BB2,1,0) ¿ï¥X³£¬OªÅ®æªº¤£­n«á¡A½Æ»s¡B¶K¤W¨ìNotes¤u§@ªí¡A¦pªG¦³­«½Æªº¦A¦Û¤v¤â°Ê§R¡C

³Â·Ð½Ð¤j¤j­Ì±Ï±Ï§Ú~~~
·P¿E¤£ºÉ!

®z¤k¤l¯d

¦^´_ 1# sax868
  1. Sub XX()
  2. With Sheets("Updated Data")
  3.   For R1 = 2 To .[A65536].End(xlUp).Row
  4.     If .Cells(R1, "AP") & .Cells(R1, "BB") <> "" Then
  5.       For R2 = 2 To Sheets("Notes").[A65536].End(xlUp).Row
  6.         If .Cells(R1, "A") & .Cells(R1, "C") & .Cells(R1, "E") = Sheets("Notes").Cells(R2, "A") & Sheets("Notes").Cells(R2, "C") & Sheets("Notes").Cells(R2, "E") Then
  7.           .Rows(R1).Copy Sheets("Notes").Rows(R2)
  8.           GoTo 10
  9.         End If
  10.       Next R2
  11.       .Rows(R1).Copy Sheets("Notes").[A65536].End(xlUp).Offset(1, 0)
  12. 10
  13.     End If
  14.   Next R1
  15. End With
  16. End Sub
½Æ»s¥N½X
1.rar (9.63 KB)

TOP

¦^´_ 2# register313

«D±`·P¿E°ª¤âregister313 ¤j¤jªºÀ°¦£!«Ü¦n¥Î³á!³o¤U§Úªº¤H¥Í¤S±q¶Â¥ÕÅܦ^±m¦âªº¤F!!
¥t¥~¡A·Q½Ð±Ð¤å¤¤ªº "10"¥Nªí¬Æ»ò·N«ä©O?

·P¿E¤£ºÉªº
®z¤k¤l¯d

TOP

¦^´_ 3# sax868

    GoTo 10       '¸õ¦Ü¦æ¸¹10
   
    10               '¦æ¸¹10

¦æ¸¹¥ç¥i§ï¬°¦æ¼ÐÅÒ

   GoTo abc     '¸õ¦Ü¦æ¼ÐÅÒabc
   
     abc:            '¦æ¼ÐÅÒabc

TOP

¦^´_ 4# register313

¤F¸Ñ!¯u¨ü¥Î~ÁÂÁÂR¤j«ü±Ð!!

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD