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

½Ð°Ý¦p¦óÅý¨ä¥LÄæ¦ì¨Ì·Ó¤µ¤Ñ¤é´ÁÅã¥Ü¤£¦P©³¦â

¦^´_ 3# coafort
        ÁÂÁ«e½ú¦^ÂÐ
¤W¦Ê¦C¬O¥i¥Hªº
½Ð«e½ú ¸Õ¬Ý¬Ý

TOP

¦^´_  coafort


    ÁÂÁ«e½úµoªí¦¹¥DÃD
VBA¤èªk¨Ñ°Ñ¦Ò
«á¾Ç½m²ß3ºØ¤èªk
Andy2483 µoªí©ó 2022-9-21 16:48



ÁÂÁ¤j¤j
¦ý¬O§Ú¦³¤W¦Ê¦C
½Ð°Ý³oµ{¦¡¬O§_¯à¥Î¡H
ÁÂÁÂ

TOP

¦^´_ 1# coafort


    ÁÂÁ«e½úµoªí¦¹¥DÃD
VBA¤èªk¨Ñ°Ñ¦Ò
«á¾Ç½m²ß3ºØ¤èªk
  1. Option Explicit
  2. Sub TEST_1()
  3. 'Åý¤µ¤Ñ¤é´ÁªºBA©³¦â¤£¦P
  4. '¥uÁ`­pAOÄæ¬O¤µ¤éªºBA¼Æ­È¦bBA2
  5. Application.ScreenUpdating = False
  6. Dim i
  7. [BA2] = ""
  8. For i = 3 To Cells(Rows.Count, "AO").End(xlUp).Row
  9.    If Cells(i, "AO") = Date Then
  10.       Cells(i, "AO").Interior.ColorIndex = 17
  11.       [BA2] = [BA2] + Cells(i, "BA")
  12.       Else
  13.          Cells(i, "AO").Interior.ColorIndex = xlNone
  14.    End If
  15. Next
  16. End Sub
  17. Sub TEST_2()
  18. 'Åý¤µ¤Ñ¤é´ÁªºBA©³¦â¤£¦P
  19. '¥uÁ`­pAOÄæ¬O¤µ¤éªºBA¼Æ­È¦bBA2
  20. Application.ScreenUpdating = False
  21. Dim i As Range, Y
  22. Set Y = CreateObject("Scripting.Dictionary")
  23. [BA2] = ""
  24. For Each i In Range([AO3], Cells(Rows.Count, "AO").End(3))
  25.    Y.Add i, i.Item(1, 13)
  26.    If i = Date Then
  27.       i.Interior.ColorIndex = 17
  28.       [BA2] = [BA2] + Y(i)
  29.       Else
  30.          i.Interior.ColorIndex = xlNone
  31.    End If
  32. Next
  33. End Sub
  34. Sub TEST_3()
  35. 'Åý¤µ¤Ñ¤é´ÁªºBA©³¦â¤£¦P
  36. '¥uÁ`­pAOÄæ¬O¤µ¤éªºBA¼Æ­È¦bBA2
  37. Application.ScreenUpdating = False
  38. Dim R&, Y, Z As Range, xR As Range
  39. Set Y = CreateObject("Scripting.Dictionary")
  40. [BA2] = ""
  41. Set Z = Range([AO3], Cells(Rows.Count, "AO").End(3))
  42. Z.Interior.ColorIndex = xlNone
  43. For Each xR In Z
  44.    Y(xR.Value) = Y(xR.Value) + xR.Item(1, 13).Value
  45.    If xR = Date Then
  46.       xR.Interior.ColorIndex = 17
  47.    End If
  48. Next
  49. [BA2] = Y(Date)
  50. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD