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

[µo°Ý] ¡mµo°Ý¡n¦³Ãö²Ö­p¼Æ¶q»P«e´Á²Ö­p¼Æ¶q³]©w¤è¦¡

[µo°Ý] ¡mµo°Ý¡n¦³Ãö²Ö­p¼Æ¶q»P«e´Á²Ö­p¼Æ¶q³]©w¤è¦¡

½Ð±Ð¤@¤U¦pªþ¥óÀɮס]°ÝÃD½Ð±Ð¡^
Äæ¦ìD¡]²Ö­p¡^=Äæ¦ìB¡]«e´Á²Ö­p¡^+Äæ¦ìC¡]¥»´Á¡^
§Ú·Q­n³]©w¤@­Ó«ö¶s©ÎVBA
·í§Ú¿é¤JÄæ¦ìC¡]¥»´Á¡^ªº¼Æ¶q¡]­È¡^«á¡AÄæ¦ìD¡]²Ö­p¡^ªº¼Æ¶q¤]·|ÀHµÛ­pºâ±o¨ì
µM«á§Ú«ö¤U¡u«ö¶s¡v©ÎVBA«á
Äæ¦ìD¡]²Ö­p¡^ªº¼Æ¶q¡]­È¡^·|¦Û°Ê¶ñ¤J¨Ã§ó´«Äæ¦ìB¡]«e´Á²Ö­p¡^ªº¼Æ¶q¡]­È¡^
µM«á§âÄæ¦ìC¡]¥»´Á¡^ªº¼Æ¶q¡]­È¡^²M°£
¦p¦¹¤@¨Ó¡A«K©ó§Ú¤U´Á­n¶i¦æ¼Æ¶q²Î­pªº®É­Ô¡A§Ú´N¤£¥Î¥ÎCOPYªº¤è¦¡
±NÄæ¦ìD¡]²Ö­p¡^COPY¦ÜÄæ¦ìB¡]«e´Á²Ö­p¡^
½Ð±Ð¦U¦ì«e½ú¡A§Ú©Ò»¡ªº³o­Ó¬O§_¥i¦æ©O¡H

°ÝÃD½Ð±Ð.jpg (45.77 KB)

°ÝÃD½Ð±Ð.jpg

¦^´_ 1# ianlcc

¬Ý¬Ýµ{¦¡¤º®e¬O§_§A©Ò»Ý¡A§Ú¤]­è¾Ç¼gVBA¡A¦³¨ä¥L°ÝÃD©Î§ó²³æ¼gªk¤]§Æ±æ¤j®a´£¥X«ü¾É¡AÁÂÁÂ
µ{¦¡¤º®e¨Ì·Ó§Aªº¹Ï¤ùÄæ¦ì©Ò¼g¡A°ß¤@¤£¦P¬O§A¥u»Ý­n¿é¤J¥»´Áªº¼Æ¨âÄæ¦ì¶ñ§¹«ö¤U«ö¶s§Y¥i¦Û°Ê­pºâ
  1. Sub AAA()

  2. Application.Calculation = xlCalculationManual

  3. Application.ScreenUpdating = False

  4. Dim i As Integer, j As Integer

  5. j = Range("C2").CurrentRegion.Rows.Count  '¦Û°Ê´M§ä³Ì«á¤@Äæ¦ì¸ê®Æ¦C

  6. i = 2

  7. Do Until i = j + 1

  8. Cells(i, "D").Value = Cells(i, "B").Value + Cells(i, "C").Value '­pºâ²Ö­p¼Æ¶q

  9. i = i + 1

  10. Loop

  11. Range(Cells(2, "D"), Cells(j, "D")).copy '§ó·s²Ö­p¼Æ¶q¨ì«e´Á¼Æ¶q

  12. Range("B2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  13.             :=False, Transpose:=False

  14. Range(Cells(2, "C"), Cells(j, "C")).ClearContents '²M°£¥»´Á¼Æ¶q

  15. Application.ScreenUpdating = True

  16. Application.Calculation = xlCalculationAutomatic

  17. End Sub
½Æ»s¥N½X
Nicole

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD