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

[µo°Ý] ¦p¦ó±NDEE³sµ²¨ìExcelªº¸ê®Æ,¨Ì·Ó·Q­nªº®É¶¡°O¿ý¤U¨Ó.

[µo°Ý] ¦p¦ó±NDEE³sµ²¨ìExcelªº¸ê®Æ,¨Ì·Ó·Q­nªº®É¶¡°O¿ý¤U¨Ó.

ª©¥D¤j¤j,¦U¦ì«e½ú,¤j®a¦n~

¦³­Ó°ÝÃD·Q½Ð±Ð¤@¤U¤j¤j­Ì:
1.§Ú§â¤@­Ó¬Ý½L³nÅ骺¤T­Ó¼Æ­È¥ÎDDE¾É¥X¨ìExcel¸Ì¤F,²{¦b·Q­n±N³o¤T­Ó¼Æ­È,¨Ì·Ó®É¶¡(¨Ò¦p:¨C1¤ÀÄÁ)
±qSheet1ªº(A2,B2,C2)­n°O¿ý¨ìShee2ªº(A2,B2,C2),µM«á¨Ì§Ç©¹¤U¬ö¿ý(A3,B3,C3)(A4,B4,C4)....~.

2.¥t¥~,³o­Ó°ÝÃD¤£ª¾¹D¤è¤£¤è«K°µ¨ì,¦pªG·Q­n¨C100µ§´N¸õ¦^¨ì²Ä¤G¦C¶}©l,Ä´¦p:
°O¿ý¨ì(A101,B101,C101)¤§«á,¤U¤@µ§´N°O¿ý¨ì(D2,E2,F2),µM«á¦b¨Ì§Ç©¹¤U¬ö¿ý(D3,E3,F3)..~

§Ú¬O·s¤â,¦³«Ü¦h¦a¤è¤£À´,½Ð¨£½Ì.
³Â·Ð¦U¦ì¤j¤j~~

ªþ¤W²³æªí®æ
¬ö¿ý.rar (1.5 KB)

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-11-14 19:01 ½s¿è

¦^´_ 1# aries
¦¨¥æ»ùªºÅܰʤ@¤ÀÄÁ¥H¤º, ¥i¯à´N¦³ÅܤÆ,©Î´X¤ÀÄÁ³£¨SÅܤÆ.©Ò¥HÀ³³]­p¬°¦¨¥æ»ù¦³ÅÜ°Ê,®É¬ö¿ý¤U¨Ó.
¬Ý½L³nÅé,¶Ç¦^¦¨¥æ»ùªºÅÜ°Ê®É,·|¤Þµo¤u§@ªíªº­«ºâCalculate   
½Ð¨Ì·Ó¤U¦C¨BÆJ¸Õ¸Õ¬Ý
1«ü¥O- ¤u¨ã-¿ï¶µ-­pºâ - ­pºâ¤è¦¡   ¤Ä¿ï  [¦Û°Ê] ¦p¹Ï



2½Ð±Nµ{¦¡½X½Æ»s¨ìVBAµøµ¡ ªº Sheet1ª«¥ó¸Ì
  1. Private Sub Worksheet_Calculate() '³o¬OSheet1¹w³]ªº­«ºâIJ°Ê¨Æ¥óµ{¦¡
  2.     Static i%
  3.     'Static ³¯­z¦¡  ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«Å§iÅܼƨðt¸mÀx¦sªÅ¶¡¡C¥H Static ³¯­z¦¡«Å§iªºÅܼơA¦bµ{¦¡°õ¦æ´Á¶¡¡A·|¤@ª½«O¯d¤º®e¡C
  4.      With Sheet2.Cells(Rows.Count, i + 1).End(xlUp).Offset(1).Resize(1, 3)
  5.         If .Cells(1, 3).Offset(-1) <> [C2] Then   '¦¨¥æ»ù¦³²§°Ê®Éªº±ø¥ó¦¨¥ß®É
  6.             .Value = [A2:C2].Value                '±NShse1ªº¤é´Á,®É¶¡,¦¨¥æ»ù°O¿ý¨ìSheet2
  7.         End If
  8.         If .Row = 100 Then i = i + 3     '¨ì²Ä100¦C®É¥k²¾3Äæ
  9.     End With
  10. End Sub
½Æ»s¥N½X
3©ó¶}½L«e¶}±ÒÀÉ®× ¸Õ¸Õ¬Ý

TOP

¦^´_ 2# GBKEE


    ÁÂÁ GBKEE ªO¥D¤j¤jªº¸Ñµª,§Ú¸Õ¸Õ¬Ý.

TOP

¥»©«³Ì«á¥Ñ aries ©ó 2010-11-16 13:12 ½s¿è

¦^´_ 2# GBKEE


   ª©¥D¤j¤j,§Ú¶}±ÒÀÉ®×°õ¦æ¥¨¶°¤§«á,¥X²{°õ¦æ¶¥¬q¿ù»~'13': «¬ºA¤£²Å¦X,
   °»¿ù¤§«á,¸õ¥Xµ{¦¡½X Åã¥Ü³o¬q
   If .Cells(1, 3).Offset(-1) <> [C2] Then   '¦¨¥æ»ù¦³²§°Ê®Éªº±ø¥ó¦¨¥ß®É   
   µM«á§Ú¦bµ{¦¡½X­nÂIÀ»°»¿ù,©Î°õ¦æªº®É­Ô,µo²{µ{¦¡¦³¶}©l¦b¶]¤F.ExcelÀɮצ³¶}©l¦b°O¿ý¤F.
   §Ú´NÃö³¬ÀɮצA­«·s¶}©l,ÁÙ¬O¤@¼Ë¥X²{°õ¦æ¶¥¬q¿ù»~ªº°T®§.
   ³o¬O­þ¸Ìªº°ÝÃD©O?  
   ¦A³Â·Ð¤j¤j¤F

TOP

If .Cells(1, 3) §â¤¤¶¡¨º­Ó"."§R¤F¡I

TOP

¦^´_ 4# aries
µ¹§Aªºµ{¦¡½X °õ¦æ¨S¦³¿ù»~°Ú ½Ðªþ¤W§AªºÀɮ׬ݬÝ
¦^´_ 5# oobird
If .Cells(1, 3) §â¤¤¶¡¨º­Ó"."§R¤F¡I
§A©Ò­n§Rªº"." ¬O With Sheet2.Cells(Rows.Count, i + 1).End(xlUp).Offset(1).Resize(1, 3)½d³òªº.Cells(1, 3).Offset(-1)
§R±¼«áªºµ{¦¡½X If Cells(1, 3).Offset(-1) <> [C2] Then   ¨ÌµM·|²£¥ÍÀ³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~

TOP

¥»©«³Ì«á¥Ñ aries ©ó 2010-11-16 20:09 ½s¿è

¦^´_ 5# oobird
      §R±¼¤§«á,¦bµ{¦¡½X©³¤U°õ¦æ,´Nª½±µ¥X²{ GBKEE¤j¤j »¡ªº¿ù»~°T®§¤F.

¦^´_ 6# GBKEE

      ªþ¤W°õ¦æ¤§«áªºÀÉ®×.
      ¥t¥~,¨ä¤¤¦³¨Ç°O¿ý¨ì²Ä99¦C´N¸õ¦æ,¦³¨Ç¤S¥i¥H¨ì²Ä100¦C,¤£ª¾¬O¤°»ò°ÝÃD.
      ¦A³Â·Ð¤j¤j¤F.
      ÁÂÁ¦U¦ì¤j¤jªºÀ°¦£.

       ¬ö¿ý.rar (12.32 KB)

TOP

¥i¯à­«·s§G¸p¤@¤U·|¦n¤@ÂI
·s¼W¤@¯ë¼Ò²Õ
¿é¤Jµ{¦¡½X
  1. Public i%
  2. Sub auto_open()
  3. With Sheet2
  4. k = .[IV1].End(xlToLeft).Column
  5. i = IIf(k = 1, 0, k - 3)
  6. If i = 0 Then .[A1:C1].Value = Sheet1.[A1:C1].Value
  7. End With
  8. End Sub
½Æ»s¥N½X
Sheet1¼Ò²Õ
  1. Private Sub Worksheet_Calculate() '³o¬OSheet1¹w³]ªº­«ºâIJ°Ê¨Æ¥óµ{¦¡
  2.     Dim A As Range
  3.     'Static ³¯­z¦¡  ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«Å§iÅܼƨðt¸mÀx¦sªÅ¶¡¡C¥H Static ³¯­z¦¡«Å§iªºÅܼơA¦bµ{¦¡°õ¦æ´Á¶¡¡A·|¤@ª½«O¯d¤º®e¡C
  4.      With Sheet2
  5.      Set A = .Cells(65536, i + 1).End(xlUp).Offset(1).Resize(, 3)
  6.      If A.Row > 100 Then i = i + 3: .Cells(1, i + 1).Resize(, 3) = [A1:C1].Value '¨ì²Ä100¦C®É¥k²¾3Äæ
  7.      Set A = .Cells(65536, i + 1).End(xlUp).Offset(1).Resize(, 3)
  8.        If A.Cells(1, 3).Offset(-1) <> [C2] Then   '¦¨¥æ»ù¦³²§°Ê®Éªº±ø¥ó¦¨¥ß®É
  9.             A.Value = [A2:C2].Value                '±NShse1ªº¤é´Á,®É¶¡,¦¨¥æ»ù°O¿ý¨ìSheet2
  10.        End If
  11.     End With
  12. End Sub
½Æ»s¥N½X
¬ö¿ý.zip (10.81 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh

·PÁÂHsiehª©¥D¤j¤j,­«·s¥Î¹Lªºµ{¦¡½X,´N³£·|©T©w¨ì100¦C´N´«¦æ,ÁÙ¦³¦Û¤v·|¼W¥[¼ÐÃD¦C,«Ü¤è«K.

¤£¹L,¦b¶}±ÒÀÉ®×°õ¦æ¥¨¶°¤§«á,ÁÙ¬O·|¥X²{°õ¦æ¶¥¬q¿ù»~'13': «¬ºA¤£²Å¦Xªºµøµ¡,§Ú«ö°»¿ù¤§«á,¶i¤Jµ{¦¡½X,
Åã¥Ü If A.Cells(1, 3).Offset(-1) <> [C2] Then   '¦¨¥æ»ù¦³²§°Ê®Éªº±ø¥ó¦¨¥ß®É ³o¬q½X©³¦â·|¤Ï¶À.
¦Ó§Ú¦pªG¤£«ö°»¿ù,ª½±µ«öµ²§ô,µ{¦¡ÁÙ¬O¦³¶}©l°õ¦æ,¬O¥i¥H¨Ï¥Îªº.

¥t¥~,¦pªG³o­Ó¿ù»~°T®§¤£®e©ö¸Ñ¨M,¦U¦ì¤j¤j´N¤£¥Î¦b³Â·Ð¤F.§Ú²q´ú·|¤£·|¬O¹q¸£©Î³nÅ骺°ÝÃD,¦Ó¸òµ{¦¡½X¨S¦³Ãö«Y.
¤Ï¥¿­ì¨Óªº°ÝÃD,¤w¸g¦³¸Ñ¨M¤F.

¦A¦¸·PÁ¦U¦ì¤j¤jªºÀ°¦£«ü±Ð.

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-11-17 18:13 ½s¿è

¦¹®ÉªºDDE¬O§_ÁÙ¥¼¶Ç¤J¼Æ¾Ú³y¦¨A2:C2¥X²{¿ù»~­È©Ò­P
  1. Private Sub Worksheet_Calculate() '³o¬OSheet1¹w³]ªº­«ºâIJ°Ê¨Æ¥óµ{¦¡
  2.     Dim A As Range
  3.     'Static ³¯­z¦¡  ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«Å§iÅܼƨðt¸mÀx¦sªÅ¶¡¡C¥H Static ³¯­z¦¡«Å§iªºÅܼơA¦bµ{¦¡°õ¦æ´Á¶¡¡A·|¤@ª½«O¯d¤º®e¡C
  4.      With Sheet2
  5.      Set A = .Cells(65536, i + 1).End(xlUp).Offset(1).Resize(, 3)
  6.      If A.Row > 100 Then i = i + 3: .Cells(1, i + 1).Resize(, 3) = [A1:C1].Value '¨ì²Ä100¦C®É¥k²¾3Äæ
  7.      Set A = .Cells(65536, i + 1).End(xlUp).Offset(1).Resize(, 3)
  8.      If IsError([C2].Value) Then Exit Sub
  9.        If A.Cells(1, 3).Offset(-1) <> [C2] Then   '¦¨¥æ»ù¦³²§°Ê®Éªº±ø¥ó¦¨¥ß®É
  10.             A.Value = [A2:C2].Value                '±NShse1ªº¤é´Á,®É¶¡,¦¨¥æ»ù°O¿ý¨ìSheet2
  11.        End If
  12.     End With
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD