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

½Ð±Ð»yªk¤Wªº°ÝÃD¡H

½Ð±Ð»yªk¤Wªº°ÝÃD¡H

¦U¦ì¥ý¶i¤j®a¦n¡I¬ù²ö¤»¦~«e¤p§Ì¶}©l¾Ç²ßvba»yªk¡A¬°ªº¬O³]­p¤@­Ó¥i¥H­pºâ¦¨ÁZªºexcelÀÉ¡A

¦ý¬O«á¨Ó¦¨ÁZ¨t²Î³£¤w¸g§ï¦¨ºô¸ô¤Æ¤F¡A©Ò¥H§Úªº excelÀÉ´NÀÁ¸m¤F¡A¤@ª½¨ì¤F³Ìªñ¡C¦]¬°

¦¨ÁZ¨t²Î§ïª©¡A©Ò¥H§Ú¤S§âexcelÀÉ®³¥X¨Ó¨Ï¥Î¤F¡A¦ý¬O¤H¨Æ¤w«D¡A§Ú§¹¥þ§Ñ¤F»yªk«ç»ò¨Ï¥Î¡C

·Q½Ð±Ð¤@­Ó»yªk°ÝÃD¡G§Ú·Q­n¦b¥´¶}¡uÁ`¦¨ÁZ¡vªº¤u§@ªí®É¡A¡uÁ`¦¨ÁZ¡vªºc2Äæ¦ì´N·|¦Û°Ê½Æ»s

¡u°ê¥­®É¡v¤u§@ªíªºQ2:Q22ªº¼Æ­È¡A©Ò¥H¼g¤F¤U¦C»yªk¡A¦ý¬O¤£ª¾­þ¸Ì¦³¿ù¡AÁٽЫü¥¿¡C·PÁÂ

Sub ¦Û°Ê½Æ»s¦¨ÁZ()
Sheets("°ê¥­®É").Range("Q2:Q22").Select
Selection.Copy
Sheets("Á`¦¨ÁZ").Range("C2").Select
ActiveSheet.Paste
End Sub

¦^´_ 13# GBKEE

«z¡I·PÁª©¥D¡AªGµM¬O¦³²`«×ªº»yªk¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-4-21 09:03 ½s¿è

¦^´_ 11# skyutm
¶K¤W­È
  1. Sub ¦Û°Ê½Æ»s¦¨ÁZ()
  2.     Dim Rng As Range
  3.     With Sheets("°ê¥­®É").Range("Q2:Q22")  '¦³©T©w¤H¼Æ¶Ü?
  4.         Set Rng = Sheets("Á`¦¨ÁZ").Range("C2").Resize(.Cells.Count)
  5.         Rng = .Value
  6.     End With
  7.     With Rng
  8.         .Cells(.Cells.Count + 1) = "=AVERAGE(" & Rng.Address & ")"
  9.     End With
  10. End Sub
½Æ»s¥N½X
'¾ã­Ó½Æ»s
  1. Sub ¦Û°Ê½Æ»s¦¨ÁZ()
  2.     With Sheets(1).Range("°ê¥­®É").Range("Q2:Q22")  '¦³©T©w¤H¼Æ¶Ü?
  3.          .Copy Sheets("Á`¦¨ÁZ").Range("C2").Resize(.Cells.Count)
  4.          Sheets("Á`¦¨ÁZ").Range("C2").Cells(.Cells.Count + 1) = "=AVERAGE(" & Sheets(2).Range("C2").Resize(.Rows.Count).Address & ")"
  5.     End With
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 10# skyutm

À³¸Ó§âµ{¦¡¥[¤Jª©¥Dªºµ{¦¡´NOK¤F
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 10# skyutm

«¢«¢¡I¯u¬O¦³½ì¡C§Ú§âµ{¦¡½X¾ã¦X¦b¤@°_´N¥i¥H¤F¡C

'******ThisWorkbook¼Ò²Õªºµ{¦¡½X********
Option Explicit

'**¬¡­¶Ã¯¶}±Ò®É¦Û°Ê°õ¦æ
Private Sub Workbook_Open()
    ¦Û°Ê½Æ»s¦¨ÁZ
End Sub
'**¬¡­¶Ã¯:¤u§@ªí¤¤²¾°Ê®É¦Û°Ê°õ¦æ
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    If Sh.Name = "Á`¦¨ÁZ" Then ¦Û°Ê½Æ»s¦¨ÁZ
End Sub
Sub ¦Û°Ê½Æ»s¦¨ÁZ()
Sheets("°ê¥­®É").Range("s2:s22").Copy
Sheets("Á`¦¨ÁZ").Activate
Sheets("Á`¦¨ÁZ").Range("C2").PasteSpecial Paste:=xlPasteValues
End Sub

TOP

¦^´_ 9# iamaraymond

·PÁ±zªºÀ°§U¡A¥i¬Oµ{¦¡½XµLªk¦Û°Ê°õ¦æ£®¡A§Ú¨Ó¾ã¦X¬Ý¬Ý¡C

TOP

¦^´_ 8# skyutm
  1. Sub ¦Û°Ê½Æ»s¦¨ÁZ()
  2. Sheets("°ê¥­®É").Range("Q2:Q22").Copy
  3. Sheets("Á`¦¨ÁZ").Activate
  4. Sheets("Á`¦¨ÁZ").Range("C2").PasteSpecial Paste:=xlPasteValues
  5. End Sub
½Æ»s¥N½X
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 7# iamaraymond


  
¬Oªº¡I¥¦À³¸Ó½Æ»s¨ì¤½¦¡¤F¡C§Ú­è­è¤]¦bºô¸ô¤W´M§ä¡A¬O§_¦³¿ï¾Ü©Ê¶K¤Wªº»yªk¶Ü¡H

TOP

¦^´_ 6# skyutm

³oºØ½Æ»s¤èªk¬O½Æ»s¬Û¹ï¦ì¸m¡A½Ð°ÝS¤j¬O¥u­n½Æ»s¼Æ¦r´N¦n¶Ü?
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 5# skyutm
·PÁ¨â¦ì¥ý¶iªº¸Ñµª¡A¤p§Ì´ú¸Õ¤§«áªGµM¥i¥H°õ¦æ¡A¦ý¬O°ÝÃD¤S¨Ó¤F¡A

¦]¬°«e­±©Ò»¡ªº¡u°ê¥­®É¡v¤u§@ªíªºq2¨ì22Äæ¦ì¬O¥Ñ«e­±ºâ¥X¥­§¡ªº¡A

©Ò¥H¦b¡uÁ`¦¨ÁZ¡v½Æ»s¤§«á·|¥X²{=AVERAGE(#REF!)³o¼Ëªº°T®§¡A§Ú±À´úÀ³¸Ó¬O

À³¸Ó§ó´«¤F¤u§@ªí¡A©Ò¥Hºâ¤£¥X¦¨ÁZ¡A¤£ª¾¸Ó¦p¦ó¸Ñ¨M©O¡HÁÂÁ¡C

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD