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

Application.Sum(Sheet.[g10:g20]) ¸Ì­±ªºSheet ¥i¥Î¥N½X¨ú¥N¶Ü¡H

Application.Sum(Sheet.[g10:g20]) ¸Ì­±ªºSheet ¥i¥Î¥N½X¨ú¥N¶Ü¡H

¤j¤j¦n¡A
½Ð°Ý¡A°²³]§Ú¦³¤Q±iSheet¡A¤À§O¬°Sheet1, Sheet2... Sheet10¡A
¦Ó§Ú¦³¿ìªk±NSum ¸Ì­±ªº Sheet ¦WºÙ§ï¥Î¥N½X¨ú¥N¶Ü¡H

¨Ò¦p,
For DQ=1 To 10

Application.Sum(DQ[g10:g20])

Next

½Ð°Ý¥H¤Wªº¼gªk¥i¦æ¶Ü¡H

ÁÂÁÂ

¬Ý¨ì2008¦~¦³¤H¼g¹LÃþ¦üªº¼gªk

a = Worksheets("sheet1").Range("a1:a10")
Application.Sum(a)

©Ò¥H§Ú¥i¥H§ï¬°¥H¤U¶Ü¡H


For DQ=1 To 10

a = Worksheets(DQ).Range("g10:g20")
Application.Sum(a)

Next

TOP

³o¼Ëªº¼gªk¦n¹³©Ç©Çªº¡A
·|·Q­n¼g³o­Ó¥D­n¬O¦]¬°¨âªºexcel ÀɮסA
­n±Na Àɮתº¸ê®Æ ²Ä¤@­¶g10 ~G20 ªº©M ¥á¨ìbÀɮתº²Ä¤@­¶ªº¬Y­Ó¦ì¸m¡]°²³]¬Oa1¦n¤F¡^
Ä~Äò·Q·Q¬Ý¡ã

TOP

¦^´_ 3# cji3cj6xu6
³]©wª«¥ó(Range,Workbook....)ÅÜ¼Æ «e­±­n¥[ Set
   
  1. Option Explicit
  2. Sub Ex()
  3.     Dim DQ As Integer, A As Range
  4.     For DQ = 1 To 10     '¤u§@ªí¯Á¤Þ 1 TO 10
  5.         Set A = Worksheets(DQ).Range("a1:a10")
  6.         MsgBox Application.Sum(A)
  7.     Next
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁªO¥D¶O¤ß¡A§ä®É¶¡¦A¸Õ¬Ý¬Ý¡C

©Ò¥H§ÚÀ³¸Ó¼g¦¨

Sub Ex()

Dim DQ As Integer, A As Range, Address1 as Integer

Address1=1

For DQ = 1 To 10     '¤u§@ªí¯Á¤Þ 1 TO 10

Windows("file1.xls").Active

Set A = Worksheets(DQ).Range("a1:a10")

MsgBox Application.Sum(A)

Windows("file2.xls").Active

Worksheets(DQ).Range("a"& Address1).value=A

Next

End Sub

³o¼Ë¹ï¶Ü¡H

¥t¥~¤@ÂI¡A MsgBox ªº¥\¯à¬O¥´¶}¤@­Ó¹ï¸Ü®Ø¬O¶Ü¡H

¦bµ{¦¡¤¤¤@©w­n¼g¬O¶Ü?

ÁÂÁÂ~

TOP

ÁÂÁªO¥D¶O¤ß¡A§ä®É¶¡¦A¸Õ¬Ý¬Ý¡C

©Ò¥H§ÚÀ³¸Ó¼g¦¨

Sub Ex()

Dim DQ As Integer, A As Range, Addr ...
cji3cj6xu6 µoªí©ó 2013-4-11 22:19



    MsgBox Application.Sum(A)  <== ³o¬O¸õ¥X¤@­Ó¤p¹ï¸Ü®Ø Åã¥ÜApplication.Sum(A)   ªºµ²ªG...
¥i¼g¥i¤£¼g
¼g¤F¬O©p¨ì®É­ÔÁÙ­n±N¨º­Ó¤p¹ï¸Ü®Ø«ö±¼..

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

ÁÂÁÂM¤j¤À¨É¡ã

TOP

ÁÂÁªO¥D¡A¥i¥H¤F¡A³Ì«á¤@¥y
Worksheets(DQ).Range("a"& Address1).value=A
À³¸Ó§ï¬°
Worksheets(DQ).Range("a"& Address1).value=Application.Sum(A)

©Ò¥H¾ã¬qÀ³¸Ó¬O
Sub Ex()

Dim DQ As Integer, A As Range, Address1 as Integer

Address1=1

For DQ = 1 To 10     '¤u§@ªí¯Á¤Þ 1 TO 10

Windows("file1.xls").Activate

Set A = Worksheets(DQ).Range("a1:a10")

MsgBox Application.Sum(A)

Windows("file2.xls").Activate

Worksheets(DQ).Range("a"& Address1).value=Application.Sum(A)

Next

End Sub

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD