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

[µo°Ý] ¦hµ§¸ê®Æ¦C¦L°ÝÃD

[µo°Ý] ¦hµ§¸ê®Æ¦C¦L°ÝÃD

¥»©«³Ì«á¥Ñ hoyeh ©ó 2010-8-24 22:40 ½s¿è

data.rar (15.64 KB)

·Q½Ð±Ð¦U¦ì¡G
ªþ¥ó¸Ì¡A
©ú²Ó±bªí®æ¬O¨Ì¾Ú©ú²Óªº¸ê®Æ°µ¦¨¡A¦pªG¤@­Ó«~¦W¤@±iªí
°²³]§Ú¦³¢´¢¯­Ó«~¦W­n¦C¦L¢´¢¯±iªí¡]ªí®æ¤U¤è¬°«~¦Wªº©ú²Ó¸ê®Æ¡^EXCEL¥i¥H¦C¦Lªº¥X¨Ó¶Ü¡H

¢Ý©ú²Óªí®æ¬O¨Ì¾Ú²£¾Pªí®æ»s§@¡A²£¾Pªí¨C­¶¦³¢³¢¯µ§¸ê®Æ
°²³]§Ú¦³¢´¢¯¢¯µ§¸ê®Æ¡AEXCEL¥i¥H±N¢´¢¯¢¯µ§¸ê®Æ¨Ì²£¾Pªí®æ¤À¦¨¢³¢¯µ§¦C¦L¶Ü¡H

¦]¬°¸ê®Æ¬°excel¡A¤£¾å±o¬O§_¥ÎexcelÁÙ¬Oµ{¦¡©Î¨ä¥L¤è¦¡¤~¯à¶]¥Xµ²ªG¡A
¥H¤W°ÝÃD¡A³Â·Ð¦U¦ì¸Ñµª¡AÁÂÁ¡C^^

¦^´_ 1# hoyeh


Q1. ©ú²Ó±bªí®æ¬O¨Ì¾Ú©ú²Óªº¸ê®Æ°µ¦¨¡A¦pªG¤@­Ó«~¦W¤@±iªí
°²³]§Ú¦³¢´¢¯­Ó«~¦W­n¦C¦L¢´¢¯±iªí¡]ªí®æ¤U¤è¬°«~¦Wªº©ú²Ó¸ê®Æ¡^EXCEL¥i¥H¦C¦Lªº¥X¨Ó¶Ü¡H
A1.¦¹ºØ¦C¦LÀ³¸Ó­n¥ÎVBA»²§U¤è¥i§¹¥þ¦Û°Ê¦C¦L¡A­Y¥H¤½µø¥²¶·¨C¤@¦¸¿é¤J«~¦W¡AµM«á¨Ì·Ó«~¦W¼g¤½¦¡±a¤Jªí®æ

Q2.¢Ý©ú²Óªí®æ¬O¨Ì¾Ú²£¾Pªí®æ»s§@¡A²£¾Pªí¨C­¶¦³¢³¢¯µ§¸ê®Æ
°²³]§Ú¦³¢´¢¯¢¯µ§¸ê®Æ¡AEXCEL¥i¥H±N¢´¢¯¢¯µ§¸ê®Æ¨Ì²£¾Pªí®æ¤À¦¨¢³¢¯µ§¦C¦L¶Ü¡H
A2.¦¹¦C¦L¸û²³æ¡A½Æ»s©Ò¦³¸ê®Æ¨ì¢Ý©ú²Óªí®æ¡AµM«á³]©w¼ÐÃD¦C¦C¦L§Y¥i
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# hoyeh


©ú²Ó±bªí®æ¥i¥H¥Î¼Ï¯Ã¤ÀªRªí§¹¦¨
¥u¬Oªí®æ»Ý­n§@¨Ç¬ü¤Æ
¾÷¾¹¤H¤T¤j©w«ß-«OÅ@¤HÃþ¡BªA±q©R¥O¡B«OÅ@¦Û¤v
§Úªº¤T¤j©w«ß-¥Í©R¡B¥Í¦s¡B¥Í¬¡

TOP

¥»©«³Ì«á¥Ñ hoyeh ©ó 2010-8-24 22:31 ½s¿è

Q1. ©ú²Ó±bªí®æ¬O¨Ì¾Ú©ú²Óªº¸ê®Æ°µ¦¨¡A¦pªG¤@­Ó«~¦W¤@±iªí
°²³]§Ú¦³¢´¢¯­Ó«~¦W­n¦C¦L¢´¢¯±iªí¡]ªí®æ¤U¤è¬°«~¦Wªº©ú²Ó¸ê®Æ¡^EXCEL¥i¥H¦C¦Lªº¥X¨Ó¶Ü¡H
A1.¦¹ºØ¦C¦LÀ³¸Ó­n¥ÎVBA»²§U¤è¥i§¹¥þ¦Û°Ê¦C¦L¡A­Y¥H¤½µø¥²¶·¨C¤@¦¸¿é¤J«~¦W¡AµM«á¨Ì·Ó«~¦W¼g¤½¦¡±a¤Jªí®æ

--->­n¨Ï¥Î¨ìVBA»²§U¡A³o­Ó¦³ÂI¶W¥X¦Û¤vªº²z¸Ñ½d³ò¤F^^bb

Q2.¢Ý©ú²Óªí®æ¬O¨Ì¾Ú²£¾Pªí®æ»s§@¡A²£¾Pªí¨C­¶¦³¢³¢¯µ§¸ê®Æ
°²³]§Ú¦³¢´¢¯¢¯µ§¸ê®Æ¡AEXCEL¥i¥H±N¢´¢¯¢¯µ§¸ê®Æ¨Ì²£¾Pªí®æ¤À¦¨¢³¢¯µ§¦C¦L¶Ü¡H
A2.¦¹¦C¦L¸û²³æ¡A½Æ»s©Ò¦³¸ê®Æ¨ì¢Ý©ú²Óªí®æ¡AµM«á³]©w¼ÐÃD¦C¦C¦L§Y¥i

--->·PÁ¸ѵª¡A§Ú«ç»ò¨S·Q¨ìÁÙ¦³³o­Ó¤èªk^^¡A¦ý¦pªG¤U¤è­Y­n¦³¦X­p»P»\³¹Äæ¦ì¡A³o­Ó¤èªk´NÀ³¸Ó¤£¦æ¤F¬O¶Ü¡H

¹ïexcel³B©ó¥b¥Í¤£¼ôªºª¬ºA¡AÁÙ¬O«D±`·PÁ±zªº¸Ñµª¡AÁÂÁ¡C

TOP

¥»©«³Ì«á¥Ñ hoyeh ©ó 2010-8-24 22:38 ½s¿è
©ú²Ó±bªí®æ¥i¥H¥Î¼Ï¯Ã¤ÀªRªí§¹¦¨
¥u¬Oªí®æ»Ý­n§@¨Ç¬ü¤Æ
asimov µoªí©ó 2010-8-24 01:08



­ì¨ÓÁÙ¦³¼Ï¯Ã¤ÀªR¥i¥H¬ã¨s¡A­è¦n¹ï¼Ï¯Ã¤ÀªR³o¶ô¤ñ¸û®zOrz
­n¤Wºô¬Ý¤@¤U¥\¯à±Ð¾Ç^^bb¡A¤£¹L¦Ü¤ÖÁÙ¦³­Ó¤è¦VÁÙ¦³¥i¯à§¹¦¨
«D±`·PÁ±zªº¸Ñµª¡A¦³­Ó¤è¦V¥i¥H«ä¦Ò¡AÁÂÁ¡C

TOP

¦^´_ 4# hoyeh
  1. Sub ©ú²Ó()
  2. Dim Ar As Variant, Ay()
  3. Set dic = CreateObject("Scripting.Dictionary")
  4. With Sheet1
  5.    For Each a In .Range(.[D2], .[D65536].End(xlUp))
  6.       If IsEmpty(dic(a.Value)) Then
  7.          Ar = _
  8.          Array(Mid(a.Offset(, -1), 3, 2), Mid(a.Offset(, -1), 5, 2), "", "", "", "", "", a.Offset(, 1).Value, a.Offset(, 2).Value, a.Offset(, 3).Value)
  9.          ReDim Preserve Ay(0): Ay(0) = Ar
  10.          dic(a.Value) = Ay
  11.          Else
  12.          Ay = dic(a.Value)
  13.          s = UBound(Ay) + 1
  14.          ReDim Preserve Ay(s)
  15.          Ay(s) = _
  16.          Array(Mid(a.Offset(, -1), 3, 2), Mid(a.Offset(, -1), 5, 2), "", "", "", "", "", a.Offset(, 1).Value, a.Offset(, 2).Value, a.Offset(, 3).Value)
  17.          dic(a.Value) = Ay
  18.        End If
  19.     Next
  20. End With
  21. With Sheet2
  22. For Each ky In dic.keys
  23.    .[A7:J52] = ""
  24.    .[C3] = ky
  25.    s = UBound(dic(ky)) + 1
  26.    If s > 46 Then
  27.    i = 0
  28.       Do Until i = s
  29.          r = 0: [A7:J52] = ""
  30.          Do Until r = 46 Or i = s
  31.          .[A7].Offset(r, 0).Resize(, 10) = dic(ky)(i)
  32.          r = r + 1
  33.          i = i + 1
  34.          Loop
  35.          .PrintPreview
  36.       Loop
  37.      Else
  38.        .[A7].Resize(s, 10) = Application.Transpose(Application.Transpose(dic(ky)))
  39.        .PrintPreview
  40.     End If
  41. Next
  42. End With
  43. End Sub
  44. Sub ²£¾P()
  45. With Sheet3
  46. i = 3
  47. Do Until i = .[B65536].End(xlUp).Row
  48. r = 0: Sheet4.[A3:J41] = ""
  49. Do Until r = 39 Or i = .[B65536].End(xlUp).Row
  50.    Sheet4.[A3].Offset(r, 0).Resize(, 10) = _
  51.    Array(.Cells(i, "B"), .Cells(i, "C"), "PCS", "", "", "", .Cells(i, "G"), "KG", .Cells(i, "F") / .Cells(i, "G"), .Cells(i, "F"))
  52.    r = r + 1: i = i + 1
  53. Loop
  54. Sheet4.PrintPreview
  55. Loop
  56. Sheet4.PrintPreview
  57. End With
  58. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ hoyeh ©ó 2010-8-28 22:26 ½s¿è

¦^´_ 6# Hsieh


   excelªGµM¤]¬Oªù«Ü²`¶øªº¾Ç°Ý¡A
¡@·PÁ±z¼·ªÅ±Ð¾Ç¡A§Ú¦A®M¥Î¬Ý¬Ý¡AÁÂÁ¡C^^


ºô¸ô·j´MVBA»²§U¡A¬Ý¤F¤´¤£¬O«ÜÁA¸Ñ
¦ýÁÙ¬O·PÁ±zªº¸Ñµª¡C^^

TOP

©ú²Ó±bªí®æ¥i¥H¥Î¼Ï¯Ã¤ÀªRªí§¹¦¨
¥u¬Oªí®æ»Ý­n§@¨Ç¬ü¤Æ
asimov µoªí©ó 2010-8-24 01:08



¯à½Ð±Ð¡A½Ð°Ý§Ú¸Õ¥Xªºµ²ªGÅܦ¨³o¼Ë¡A¬O­þ­Ó¨BÆJ°µ¿ù¤F¶Ü¡H



§Æ±æ¯à¤£§[«ü±Ð¡AÁÂÁ¡C^^

TOP

¦^´_ 8# hoyeh


±N B3 ªº"¸ê®Æ"©ì¦²¨ì C3 ªº¦X­p§Y¥i
¾÷¾¹¤H¤T¤j©w«ß-«OÅ@¤HÃþ¡BªA±q©R¥O¡B«OÅ@¦Û¤v
§Úªº¤T¤j©w«ß-¥Í©R¡B¥Í¦s¡B¥Í¬¡

TOP

¦^´_  hoyeh


±N B3 ªº"¸ê®Æ"©ì¦²¨ì C3 ªº¦X­p§Y¥i
asimov µoªí©ó 2010-8-29 22:58



­ì¨Ó¬O­n¦p¦¹¥Îªk¡AÃø©Ç¸Õ¤F«Ü¦h¦¸³£µLªk¦¨¥\¡A·PÁ«ü¾É¡AÁÂÁ¡C^^

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD