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

[µo°Ý] ¥H"«ü©w¦r"§@¬°copy¨Ã¶K¤W­Èªº«ü©w½d³ò

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-4-28 21:37 ½s¿è

¦^´_ 13# PJChen

½Ð¨Ì·Ó¥Ø«ePKG²{¦³¸ê®Æ¡A§A·Q­nªº³Ì«áµ²ªG¥Î¤â°Ê¾Þ§@§¹¦¨¤W¶Ç
¦]¬°¥H§A¿ù»~ªºµ{¦¡½X¬OµLªk¤F¸Ñ§A­nªº¥Øªº¬°¦ó
¦pªG³æ¯Â±N¸Ó½d³òÂন­È
  1. Sub Try()

  2. With Workbooks("PKG.xlsx")
  3.     With .Sheets("PKG")
  4.         Set a = .Range("D:D").Find("Shipped per SS:", LOOKAT:=xlPart)
  5.         Set b = .Range("D:D").Find("PACKING:")
  6.         If a Is Nothing Or b Is Nothing Then
  7.             MsgBox "§ä¤£¨ì"
  8.         Else
  9.             .Range(a, b.Offset(, 11)) = .Range(a, b.Offset(, 11)).Value
  10.         End If
  11.     End With
  12. End With
  13. End Sub
½Æ»s¥N½X
¦Ü©ó¨ä¥L°Ê§@½Ð´y­z²M·¡
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 11# GBKEE
VBA TEST.zip (35.83 KB)
Hi,

§Ú±N³o­Óµ{¦¡¤À¶¥¬q°õ¦æ¤F«Ü¦h¦¸,ª¾¹D³o­Ó¦®¥O¨S¦³¼g§¹,¥¦¥u¨ìcopy¨Ã¨S¦³¦b­ì«ü©w½d³ò¤¤¶K¤W­È,¦Ó¥B¥H¤U³o¼Ë°µ¨Ã¤£¦X¥G§Ú·Q­n¥H"«ü©w¤å¦r"§@¬°³]©wªº½d³ò,     .Range(Rng(1), Rng(2)).Resize(, 12).Copy Destination:=Sheets(2).Range("A1")
½ÐÀ°§Ú¬Ý¬Ýªþ¥ó,§Ú¤w±N¥¨¶°µ{¦¡ copy¶i¥h,¥u¬O¤£ª¾¹D.Range(Rng(1), Rng(2)).Resize(, 12).Copy¤§«á¦p¦ó°µ?
§Ú¤£¬O­n¦b¨ä¥¦ªºsheet    .Range("A1")¤¤¶K¤W­È,¦Ó¬O­nÅý¥¦¦b­ì³]©wªº½d³ò¶K¤W­È,½ÐÀ°À°¦£.

TOP

¦^´_ 10# c_c_lai
ÁÂÁ§A³o»ò¼ö¤ß,§A±N¥¨¶°¤¤ªº¥H¤U³o3¦æÅܦ¨¨S¦³§@¥Î,§Úª¾¹D³o¤T¦æ¨ú®ø«á¦³¤½¦¡ªº¦a¤è´N¤£·|¶Ã½X,¦ý³o¤£¬O§Ú­nªº,
    ' Sheets("PKG").Select
    ' Columns("R:AC").Select
    ' Selection.Delete Shift:=xlToLeft
­«ÂIÀ³¸Ó©ñ¦b            .Range(Rng(1), Rng(2)).Resize(, 11).Copy   ....³o¦æ°õ¦æ¤F¥H«á¥u¦³copy¨S¦³¿ìªk¦b¿ï¨úªº½d³ò¤¤¶K¤W­È,¥u­n³o­Ó¥i¥H"°_§@¥Î",¨ä¥¦¦³¤½¦¡ªº³¡¥÷´N³£¤£¬O°ÝÃD,¦Ü©ó¥H¤Uªº6¦æ¬O§Ú¤@©w­n°õ¦æªº,¤£¯à§R°£.
    Sheets("PKG").Select
     Columns("R:AC").Select
     Selection.Delete Shift:=xlToLeft
    Columns("A:C").Select
    Range("C11").Activate
    Selection.Delete Shift:=xlToLeft

TOP

¦^´_ 6# PJChen
.Range(Rng(1), Rng(2)).Resize(, 12).Copy Destination:=Sheets(2).Range("A1")
³oSheets(2) ¬O­þ­Ó¬¡­¶Ã¯ªº²Ä2­Ó¤u§@ªí
PKG.xlsx , Shipping VBA.xlsm ³£§ä¤£¨ì ³oµ{¦¡¥i¥H°õ¦æ¶Ü?

TOP

¦^´_ 4# GBKEE
¦^´_ 8# PJChen
§Ú§ä¨ì­ì¦]¤F¡A¦p¹Ï¥Ü¡B¤Î¥N½X (¹Bºâ¤½¦¡)¡G
  1.     ' Sheets("PKG").Select                           ' *****************
  2.     ' Columns("R:AC").Select                      ' *****************
  3.     ' Selection.Delete Shift:=xlToLeft       ' *****************
  4.     Columns("A:C").Select
  5.     Range("C11").Activate
  6.     Selection.Delete Shift:=xlToLeft
½Æ»s¥N½X

VBA TEST.rar (56.61 KB)

TOP

¦^´_ 4# GBKEE
¦^´_ 8# PJChen
­ì¨Ó«üªº¬O³o­Ó¡AG¤j¤j³o¤è­±±z¤ñ¸û¦b¦æ¡A´«±z¤W³õ¤F¡I

TOP

¦^´_ 7# c_c_lai
Hi,

§Ú¬Ý¨ì§A¤W¶Ç°õ¦æ¥¨¶°«áªºÀÉ,´N¸ò§Ú°õ¦æªºµ²ªG¬Û¦P,¦³¤½¦¡ªº¦a¤è³£¬O¶Ã½X,§Úª¾¹D¥¨¶°¥i¥H°õ¦æ¦ý§Ú»Ýªº¬O«ü©w½d³ò§@copy¨Ã¶K¤W­Èªº°Ê§@,µ²ªG¥t¦s«á´N³£¶Ã½X¤F,ªí¥Ü¥¨¶°¤¤ªº"copy¨Ã¶K¤W­Èªº°Ê§@"¨Ã¨S¦³¥Í®Ä!

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2012-4-28 19:29 ½s¿è

¦^´_ 6# PJChen
¸Õ¸Õ³o­Ó¡G  ³Ì©³¤U¨º±i¹Ï¬O¤£¤p¤ßªþ¤Wªº¡A©p´N·í§@¨S¬Ý¨ì¡I


Shipping Doc.rar (55.72 KB)

01.gif (117.9 KB)

01.gif

TOP

¦^´_ 4# GBKEE
¦^´_ 5# c_c_lai
VBA TEST.zip (35.57 KB)

¤G¦ì¦n,
¤GºØ¤è¦¡§Ú³£¸Õ¤F,ÁÙ¬O¦æ¤£³q,§Úªº¥¨¶°µ{¦¡³£¬O¥t¦sªº,§Ú»Ýªº¬O«ü©w½d³ò§@copy¨Ã¶K¤W­Èªº°Ê§@,µ²ªG¥t¦s«á´N³£¶Ã½X¤F,ªí¥Ü¥¨¶°¤¤ªº"copy¨Ã¶K¤W­Èªº°Ê§@"¨Ã¨S¦³¥Í®Ä!
²{¦b§Ú±N§@¦nªºÀɮפW¶Ç,¯àÀ°§Ú¬Ý¬Ý¥X¤F¤°»ò°ÝÃD¶Ü?

TOP

¦^´_ 2# GBKEE
­è­è®³ÁA³o­Ó½d¨Ò°µ´ú¸Õ¡Aµo²{ Resize(, 11) À³¬° Resize(, 12)¡A¦p¦¹½d³ò¤~¯à¨ì¹F D19:O133
  1. Sub Ex()
  2.     Dim Rng(1 To 2) As Range
  3.     With ActiveSheet
  4.         Set Rng(1) = .Range("D:D").Find("Shipped per SS:", LOOKAT:=xlPart)
  5.         Set Rng(2) = .Range("D:D").Find("PACKING:")
  6.         If Rng(1) Is Nothing Or Rng(2) Is Nothing Then
  7.             MsgBox "§ä¤£¨ì"
  8.         Else
  9.             .Range(Rng(1), Rng(2)).Resize(, 12).Copy Destination:=Sheets(2).Range("A1")
  10.         End If
  11.     End With
  12. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD