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

[µo°Ý] (¤w¸Ñ¨M)¯B°Ê°Ï°ìªº§@·~

[µo°Ý] (¤w¸Ñ¨M)¯B°Ê°Ï°ìªº§@·~

¥»©«³Ì«á¥Ñ freeffly ©ó 2012-2-22 17:05 ½s¿è

§Ú·Q­n°Ý¤@¤U¦pªþ¥[Àɨº¼Ë§Úªºsum¨º¦U³¡¥÷­n«ç»ò³]?
¦]¬°¨C¦U¤ë¾ã²z¥X¨Óªº°Ï°ì³£¤£¤@¼Ë
©Ò¥H¨S¿ìªk©T©w°Ï¶¡
­ì¥»·Q¨ì¤U­±ªº¤è¦¡
¥i¬O¤£¥i¦æ
n ÁöµM¬O¹ïªº
¥i¯à§ÚÁٯʭþ¦U³¡¥÷
½Ð¤j¤jÀ°§Ú¬Ý¤@¤U
ÁÂÁÂ


Sub Macro1()
'
' Macro1 Macro
' User ¦b 2011/3/2 ¿ý»sªº¥¨¶°
'
    Dim ½d³ò As Range, n As Integer
    Set ½d³ò = Range("A" & Range("A65536").End(xlUp).Row)
    i = ½d³ò.CurrentRegion.Rows.Count - 1
    n = i * -1
     Range("H" & Range("A65536").End(xlUp).Row + 1) = "=sum(R[-1]C:R[n]C)"   
End Sub

°ÝÃD.rar (9.9 KB)

¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

  1. Sub revisedprogram()

  2. Dim myrange As Range, downlimit As Range, uplimit As Range, rightlimit As Range, myregion As Range

  3. Dim a, H, i
  4. Set myrange = Range("a65536").End(xlUp)

  5. Set downlimit = myrange
  6. Set uplimit = downlimit.End(xlUp)
  7. Set rightlimit = downlimit.End(xlToRight)
  8. Set myregion = Range(uplimit, rightlimit)

  9. H = 0
  10. i = 0

  11. For Each a In Range(uplimit, downlimit)
  12. 'if a.offset(,5) = "??§÷®Æ­Ü" and a.offset(,6) = "?" ? => ¦Û¤v¶ñ¤J©Ò»Ýªº¿z¿ï¶µ
  13. H = H + a.Offset(, 7).Value
  14. i = i + a.Offset(, 8).Value
  15. 'end if
  16. Next

  17. downlimit.Offset(1, 6) = "¤p­p"
  18. downlimit.Offset(1, 7) = H
  19. downlimit.Offset(1, 8) = i
  20. downlimit.Offset(1, 9) = H / i
  21. downlimit.Offset(1, 7).Interior.ColorIndex = 6
  22. downlimit.Offset(1, 8).Interior.ColorIndex = 6
  23. downlimit.Offset(1, 9).Interior.ColorIndex = 6

  24. End Sub
½Æ»s¥N½X
À³¸Ó³o¼Ë§a,¦pªG¨S¦³¨Æ¥ý¿z¿ï,§âºñ¦â¦r¦ê³Ìªìªº¨º­Ó ' ®³±¼,¿é¤J©Ò»Ý´N¦æ
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 19# freeffly
§â§Úªºµ{¦¡­×§ï¤@¤U.Åܦ¨
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 18# FAlonso


    Àɮפº§Ú¦³»¡©ú
     ½Ð¬ÝÀɮקa

¯B°Ê°Ï°ì°ÝÃD.rar (16.74 KB)

¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 17# freeffly
§Ú²q·Q©Î³\¤u§@ªí¤¤¦³«Ü¦h°Ï¶ô,·í¤¤¤@¨Ç¤S­n¹ïO§@­pºâ,©Ò¥H¼g¦¨¤Floop
¥u¹ï³Ì¤U¼h°Ï°ì§@¤p­p,§â7/33/34¦æªºµ{¦¡§R±¼«K¦æ
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 16# FAlonso


    §Ú¥u­n¥[Á`³Ì«á¨Ì°Ï¶ô
      §Aªº¤è¦¡¦n¹³¬O°w¹ï"O"¶i¦æ¥[Á`
      §Ú­è¬Ý§Oªº°Ï¶ô¥[Á`¦n¹³¦³°ÝÃD
      §Aªº¤è¦¡¦n¹³¦³ÂIÃþ¦ü¥t¤@¦ì¤j¤j¦ý¬O¤S¦³¨Ç®t²§
      ©ú¤Ñ¦b§i¶D§A®t¦b­þ¸Ì
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 1# freeffly
¦pªG¼Ó¥D¦³ªÅªº¸Ü,¥i§_¸Õ¸Õ§Ú³o­Ó§@«~,¦³¿ùªº¸Ü½Ð³qª¾§ÚÅý§Ú§ï¥¿
  1. Sub abc()
  2. Dim myrange As Range, downlimit As Range, uplimit As Range, rightlimit As Range, myregion As Range
  3. Dim a, h, i

  4. Set myrange = Range("a65536").End(xlUp)

  5. Do
  6. Set downlimit = myrange
  7. Set uplimit = downlimit.End(xlUp)
  8. Set rightlimit = downlimit.End(xlToRight)
  9. Set myregion = Range(uplimit, rightlimit)

  10. h = 0
  11. i = 0

  12. For Each a In Range(uplimit, downlimit)
  13. If a.Offset(, 6) = "O" Then
  14.     h = h + a.Offset(, 7).Value
  15.     i = i + a.Offset(, 8).Value
  16. End If
  17. Next

  18. If h <> 0 Then
  19. downlimit.Offset(1, 6) = "¤p­p"
  20. downlimit.Offset(1, 7) = h
  21. downlimit.Offset(1, 8) = i
  22. downlimit.Offset(1, 9) = h / i
  23. downlimit.Offset(1, 7).Interior.ColorIndex = 6
  24. downlimit.Offset(1, 8).Interior.ColorIndex = 6
  25. downlimit.Offset(1, 9).Interior.ColorIndex = 6
  26. End If

  27. Set myrange = uplimit.End(xlUp)
  28. Loop While myrange.Address <> "$A$1"
  29. End Sub
½Æ»s¥N½X
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 14# GBKEE


    ÁÂÁÂ
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 13# freeffly
¹ïªº

TOP

¦^´_ 12# GBKEE


   ÁÂÁÂ
    ¦³ÂI¬ÝÀ´¤F
   ¥D­n¬ORªº°Ï°ìªº²¾°Ê¥[Á`
    ¥i¥H³o¼Ë»¡¶Ü
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD