§Q¥Î¤é´Á¨Ó¥[Á`·í¤éª÷ÃB¥X¿ù
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2025-2-11
|
¦^´_ 3# coafort
ÁÂÁ«e½úµoªí¦¹¥DÃD
½Ð«e½ú¸Õ¸Õ¬Ý
1.AO3:AO39®æ¦¡³]¬°yyyy/m/d;@
2.AO3³]¤½¦¡ =IF(AS3="","",TODAY())
3.¤U¨ê¨ìAO39
TEST_20220923-1.zip (25.09 KB)
¤µ¤é²ß±o=SUMPRODUCT()- Option Explicit
- Sub TEST_1()
- '[AS3:AS39]Åܧó IJµo
- 'Åý[AO3:AO39]¤µ¤Ñ¤é´ÁªºAO©³¦â¤£¦P,¹ïÀ³[BG46:BG82]©³¦â¤£¦P¤]¤£¦P
- '¥uÁ`p[AO3:AO39]¬O¤µ¤éªº,¹ïÀ³[BG46:BG82]¼ÆȦbBG2
- Application.ScreenUpdating = False
- Dim i
- [BG2] = ""
- For i = 3 To 39
- If Cells(i, "AO") = Date Then
- Cells(i, "AO").Interior.ColorIndex = 17
- Cells(i, "BG").Item(44, 1).Interior.ColorIndex = 17
- [BG2] = [BG2] + Cells(i, "BG").Item(44, 1)
- Else
- Cells(i, "AO").Interior.ColorIndex = xlNone
- Cells(i, "BG").Item(44, 1).Interior.ColorIndex = xlNone
- End If
- Next
- End Sub
- Sub TEST_2()
- '[AS3:AS39]Åܧó IJµo
- 'Åý[AO3:AO39]¤µ¤Ñ¤é´ÁªºAO©³¦â¤£¦P,¹ïÀ³[BG46:BG82]©³¦â¤£¦P¤]¤£¦P
- '¥uÁ`p[AO3:AO39]¬O¤µ¤éªº,¹ïÀ³[BG46:BG82]¼ÆȦbBG2
- Application.ScreenUpdating = False
- Dim i As Range, Y
- Set Y = CreateObject("Scripting.Dictionary")
- [BG2] = ""
- For Each i In Range([AO3], [AO82])
- Y.Add i, i.Item(44, 19)
- If i = Date Then
- i.Interior.ColorIndex = 35
- i.Item(44, 19).Interior.ColorIndex = 35
- [BG2] = [BG2] + Y(i)
- Else
- i.Interior.ColorIndex = xlNone
- i.Item(44, 19).Interior.ColorIndex = xlNone
- End If
- Next
- End Sub
- Sub TEST_3()
- '[AS3:AS39]Åܧó IJµo
- 'Åý[AO3:AO39]¤µ¤Ñ¤é´ÁªºAO©³¦â¤£¦P,¹ïÀ³[BG46:BG82]©³¦â¤£¦P¤]¤£¦P
- '¥uÁ`p[AO3:AO39]¬O¤µ¤éªº,¹ïÀ³[BG46:BG82]¼ÆȦbBG2
- Application.ScreenUpdating = False
- Dim R&, Y, Z As Range, xR As Range
- Set Y = CreateObject("Scripting.Dictionary")
- [BG2] = ""
- Set Z = Range([AO3], [BG82])
- Z.Interior.ColorIndex = xlNone
- For Each xR In Z
- Y(xR.Value) = Y(xR.Value) + xR.Item(44, 19).Value
- If xR = Date Then
- xR.Interior.ColorIndex = 38
- xR.Item(44, 19).Interior.ColorIndex = 38
- End If
- Next
- [BG2] = Y(Date)
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|