¾È³çÇϼ¼¿ä.
¿öÅ©½ÃÆ® ÇÔ¼ö¸¸À¸·Î´Â ÅëÈ ±âÈ£ ÆǺ°À» ÇÒ ¼ö°¡ ¾ø³×¿ä.
ºÎµæÀÌÇÏ°Ô VBA·Î »ç¿ëÀÚ Á¤ÀÇ ÇÔ¼ö¸¦ ¸¸µé¾î ½á¾ß ÇÒ µíÇÕ´Ï´Ù.
ÇÏÁö¸¸ ÀÌ·± °æ¿ì¶óµµ ȸ¿ø´ÔÀÌ ¼¿¿¡ ¾î¶² Ç¥½Ã Çü½ÄÀ» ÁöÁ¤Çß´À³Ä¿¡ µû¶ó
Á¤È®ÇÑ °á°ú°¡ ³ª¿ÀÁö ¾ÊÀ» ¼öµµ ÀÖ½À´Ï´Ù.
´ÙÀ½ »ç¿ëÀÚ ÁöÁ¤ ÇÔ¼ö´Â $#,##0 ¶Ç´Â ¢æ#,##0 µî°ú °°ÀÌ
ÅëÈ ±âÈ£¸¦ Á¤ÇØ Ç¥½Ã Çü½ÄÀ» ÁöÁ¤ÇÑ ¼¿À̶ó°í °¡Á¤ÇÑ °ÍÀÔ´Ï´Ù.
Function CurSum(rngData, strCur) As Double Dim rngCell As Range Dim sumTemp As Double On Error GoTo errProcess For Each rngCell In rngData If rngCell.NumberFormat Like "*" & strCur & "*" Then sumTemp = sumTemp + rngCell End If Next CurSum = sumTemp Exit Function errProcess: CurSum = 0 End Function
¸ðµâ ½ÃÆ®¿¡ À§¿Í °°ÀÌ ÀÔ·ÂÇÑ ´ÙÀ½ ¿öÅ©½ÃÆ®¿¡¼ »ç¿ëÇÒ ¶§´Â
=CurSum(A1:A20, "¢æ") ¿Í °°ÀÌ ÀÔ·ÂÇÕ´Ï´Ù.
±×·¯¸é A1:A20¿¡¼ ÁöÁ¤ÇÑ ÅëÈ ±âÈ£°¡ ÀÖ´Â ¼¿ÀÇ ÇÕ°è°¡ ±¸ÇØÁý´Ï´Ù.
ÀÚ¼¼ÇÑ ¼³¸íÀº »ý·«ÇÕ´Ï´Ù. ¿¢¼¿ ¸ÅÅ©·Î/VBA °Á¸¦ Âü°íÇϽʽÿÀ.
°¨»çÇÕ´Ï´Ù.
|