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

[µo°Ý] ½Ð°ÝSumif VBA«ç»ò¼g

[µo°Ý] ½Ð°ÝSumif VBA«ç»ò¼g

=sumif(A:A,"*"&150102&"*",C:C)
¥i¥H¨D¥X 150102 ­Èµ¥©ó1000

°²³]§Ú§â¤½¦¡±a¨ìF1ªºÀx¦s®æ ¥L¬O­pºâ¥X 150101 ªº¼Æ­È 300
§Ú·Q­n¥H¦¹Ãþ±À¥ÎVBA¨Ó±a¨ìF2ªºÀx¦s®æºâ¥X 150102ªº¼Æ­È¬O1000

³Â·Ð¦U¦ì¤j¤j¤F

  ¥Í²£§å¸¹               §¹¦¨¤é´Á     ¼Æ¶q

A6TG- 150101B - 2   1/3A   100
A6TG- 150101B - 3   1/3A   100
A6TH- 150101B - 4   1/3A   100
A6TH- 150102B - 1   1/3C   500
A6TH- 150102B - 2   1/3C   300
A6TH- 150102B - 3   1/3C   200

¦^´_ 1# amber123
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim ¼Æ¦r As String, ¤½¦¡ As String
  4.     ¼Æ¦r = 150101
  5.     ¤½¦¡ = "=SUMIF(A:A," & """*""" & "&" & ¼Æ¦r & "&" & """*""" & ",C:C)"
  6.     MsgBox Evaluate(¤½¦¡)
  7. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD