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

[µo°Ý] ¦p¦ó¥ÎINPUTBOX¿é¤J¦¬³æ¤é´Á,¶]¥X¨C­Ó³B¤è¤é´Áªº¼Æ¶q¥[Á`,¨Ã¥HMSGBOXÅã¥Ü

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-5-25 08:13 ½s¿è

¦^´_ 2# luhpro
¼Ó¥D§Æ±æ INPUTBOX¿é¤J¦¬³æ¤é´Á,¶]¥X¨C­Ó³B¤è¤é´Áªº¼Æ¶q¥[Á`
  For iI = 2 To iRow
    oD(CStr(Cells(iI, 1))) = oD(CStr(Cells(iI, 1))) + Val(Cells(iI, 3))
  Next iI
³o¬qµ{¦¡½X¬O¨C¤@³B¤è¤é´Áªº¼Æ¶q¥[Á`

TOP

  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Set d1 = CreateObject("Scripting.Dictionary")

  4. myday = CDate(InputBox("¿é¤J¤é´Á", , Date))
  5. For Each a In Range([D2], [D65536].End(xlUp))
  6.   If a = myday Then d(a.Offset(, -3) & "") = d(a.Offset(, -3) & "") + a.Offset(, -1)
  7. Next
  8. For Each ky In d.keys
  9.    d1(ky & ":" & d(ky)) = ""
  10. Next
  11. MsgBox Join(d1.keys, Chr(10))
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¼Ï¯Ãªº¤è¦¡§Ú¤£·|, ©Ò¥H´N¸ÕµÛ¥Î¤ñ¸û´¶³qªº¤è¦¡¨Ó¹F¦¨ :
Sub nn()
  Dim sStr$, sDate$
  Dim iRow%, iI%
  Dim vDate
  Dim oD As Object

  Set oD = CreateObject("Scripting.Dictionary")
  iRow = [A65535].End(xlUp).Row
  For iI = 2 To iRow
    oD(CStr(Cells(iI, 1))) = oD(CStr(Cells(iI, 1))) + Cells(iI, 3)
  Next iI
  vDate = InputBox("½Ð¿é¤J­n¬d¸ßªº¦¬³æ¤é´Á : ", "¿é¤J¦¬³æ¤é´Á")
  For iI = 2 To iRow
    If Trim(CStr(Cells(iI, 4))) = Trim(CStr(vDate)) Then
      If sDate <> CStr(Cells(iI, 1)) Then
        sStr = sStr + Chr(10) + CStr(Cells(iI, 1)) + " : " + CStr(oD(CStr(Cells(iI, 1))))
        sDate = CStr(Cells(iI, 1))
      End If
    End If
  Next iI
  MsgBox "¦¬³æ¤é´Á : " + vDate + " ªº¼Æ¶q" + sStr
End Sub

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD