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

[µo°Ý] ²Å¦X¦h±ø¥ó±a¥X¬ÛÃö¸ê°T

¦^´_ 3# ­ã´£³¡ªL


    ÁÂÁ«e½ú«ü¾É
B13//
=RIGHT(TEXT(A13,"aaa"))  A13¿é¤J¤é´Á, ¦Û°ÊÅÜ´«¬P´Á

1.±N[A13]­ÈÂà´«¬°¶g¤G,¦A¨ú¨ä³Ì¥kÃ䪺²Ä1­Ó¦rÅã¥Ü¦b[B13]¦¹Àx¦s®æ
1.1.TEXT(): ¥H®æ¦¡¥N½X¨Ó®M¥Î®æ¦¡¡AÂǦ¹Åܧó¼Æ¦rÅã¥Üªº¤è¦¡
=TEXT(A13,"aaa")¡÷  ¶g¤G
https://support.microsoft.com/zh-tw/office/text-%E5%87%BD%E6%95%B8-20d5ac4d-7b94-49fd-bb38-93d29371225c

1.2.=RIGHT("¶g¤G")¡÷  ¤G
§¹¾ã¤è¦¡ =RIGHT("¶g¤G",1) ¦pªG¬Ù²¤ 1¡A«h·|°²³]¨ä­È¬° 1
https://support.microsoft.com/zh-tw/office/right-rightb-%E5%87%BD%E6%95%B8-240267ee-9afa-4639-a02b-f19e1786cf2f
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

B13//
=RIGHT(TEXT(A13,"aaa"))  A13¿é¤J¤é´Á, ¦Û°ÊÅÜ´«¬P´Á

A15//°}¦C¤½¦¡(¤TÁä¦P«ö)
=iferror(INDEX($A:$E,SMALL(IF(1-ISERR(0/(FIND($B$13,"/"&$C$2:$C$9)-1)),ROW($2:$9)),ROW(A1)),MATCH(A$14,$1:$1,))&"","")
¥k©Ô//¤U©Ô

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-12-21 15:25 ½s¿è

¦^´_ 1# 013160


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨ÒÀÉ®×
«á¾ÇÂǦ¹¥DÃD¾Ç²ß¨ì«Ü¦hª¾ÃÑ,¦ý¤£ª¾¬O§_²Å¦X«e½ú±¡¹Ò»Ý¨D,½Ð¸Õ¸Õ¬Ý

¿é¤Jµ¡: ¹w¥ý¸m¤J¤µ¤Ñ¤é´Á


«ö½T©w«á:


¿é¤J: 12/22


¿é¤J: 12/23


µ{¦¡½X¦p¤U:

Option Explicit
Sub ²Å¦X¦h±ø¥ó±a¥X¬ÛÃö¸ê°T_20221221_1()
Dim Arr(4), Brr, Crr, i&, Y, T
Dim Sh As Worksheet, Da, N&, j%, We
Set Y = CreateObject("Scripting.Dictionary")
Set Sh = ActiveSheet
Brr = Range(Sh.[A1], Sh.UsedRange)
Da = InputBox("½Ð¿é¤J ¤é´Á!", "²Å¦X¦h±ø¥ó±a¥X¬ÛÃö¸ê°T", Date)
If Not IsDate(Da) Then Exit Sub
We = Right(Format(Da, "aaaa"), 1)
T = Array(5, 1, 2, 3, 4)
For i = 2 To UBound(Brr)
   If Trim(Brr(i, 3)) = "" Then Exit For
   If InStr(Brr(i, 3), We) Then
      If N = 0 Then
         Crr = Arr
         For j = 0 To UBound(T)
            Crr(j) = Brr(1, T(j))
         Next
         N = N + 1
         Y(N) = Crr
      End If
      N = N + 1
      Crr = Arr
      For j = 0 To UBound(T)
         Crr(j) = Brr(i, T(j))
      Next
      Y(N) = Crr
   End If
Next
If N = 0 Then Exit Sub
Workbooks.Add
[A2].Resize(N, UBound(Arr) + 1) = Application.Transpose(Application.Transpose(Y.ITEMS))
Range([A1], ActiveSheet.UsedRange).Borders.LineStyle = 1
Cells.Columns.AutoFit
[2:2].Font.Bold = True
[A1].NumberFormatLocal = "m""¤ë""d""¤é"";@"
[A1] = Da: [B1] = We
Set Y = Nothing
Set Brr = Nothing
Erase Crr, Arr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD