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

[µo°Ý] ½Ð±Ð¡A¦p¦ó½Æ»s¤£¦P¤u§@ªí¯S©wÄæ¦ì(©¿²¤ªÅ¥Õ­È)¨ì¤@­Ó¤u§@ªí¤W

[µo°Ý] ½Ð±Ð¡A¦p¦ó½Æ»s¤£¦P¤u§@ªí¯S©wÄæ¦ì(©¿²¤ªÅ¥Õ­È)¨ì¤@­Ó¤u§@ªí¤W

¦U¦ì¤j¯«¦n¡A¤p§Ì¤µ¤Ñ¹J¨ì§Ú¦³¤£¦Pªº¤u§@ªí¡A¤j·§10­Ó(¤£¦P­Ó¦WºÙ¡A¦p XXXX-³æ»ù¤ÀªR)
¥L­Ìªº®æ¦¡³£¤@¼Ë¡A¤µ¤Ñ·Q§â¥L­Ì¥þ³¡·J¾ã¨ì¤@­Ó¤u§@ªí¡A­ì¥»¨Ï¥Î¿ý»s¥¨¶°¡A
¦ý¬O§Ú¤£ª¾¹D¦p¦ó¥[¼g Åý¥¦¦Û°Ê§PÂ_ ¨C­Óªí®æ¤§¶¡³£·|¹j¤@¦C¡C

Àɮצpªþ¥ó¡ã
1090722-TEST.zip (25.41 KB)

³æ»ù¤ÀªRÁ`ªí ´N¬O§Ú­nªºµ²ªG ¦A«ô°U¦U¦ì¤j¤j«üÂI°g¬z

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«¾Ç²ß¨ì«Ü¦hª¾ÃÑ,¥H1#½d¨Òªº¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

³æ»ù¤ÀªR¤Àªí:


³æ»ù¤ÀªRÁ`ªí°õ¦æµ²ªG:



Option Explicit
Sub TEST()
Dim Z, Q, i&, R&, V&, c%, xR As Range, xA As Range, Sh As Worksheet
Set Z = CreateObject("Scripting.Dictionary")
Set Sh = ¤u§@ªí1: Range(Sh.[A1], Sh.UsedRange).Offset(5).Delete
Set xR = [³æ»ù¤ÀªRÁ`ªí!B6]
For i = 0 To 10: Z(Right(Application.Text(i, "[DBNum1]"), 1)) = i: Next
For i = 1 To Worksheets.Count
   If Right(Trim(Sheets(i).Name), 5) <> "-³æ»ù¤ÀªR" Then GoTo i01
   Q = Trim(Sheets(i).[B2]) & "¡³¡³¡³"
   For c = 1 To 3: V = Val(V & Z(Mid(Q, c, 1))): Next
   Set Z(V) = Sheets(i): V = 0
i01: Next
For i = 1 To Z.Count
   Q = Application.Small(Z.Keys, i)
   If IsError(Q) Then Exit For
   Set xA = Range(Z(Q).[B2], Z(Q).[G65536].End(3)(1, 2))
   xA.Copy xR
   Set xR = xR.Item(xA.Rows.Count + 2)
Next
With Sh.UsedRange: .Font.ColorIndex = 1: .Value = .Value: End With
Range(Sh.[A1], xR(-1, 8)).Name = "Print_Area"
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

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

ÁÂÁ­ã¤j¡A¤p§Ì¨ØªA±o¤­Åé§ë¦a°Ú¡I
³ø§i­ã¤j¡A¤p§Ì¦³µo²{§A®æ¦¡­ì¥»¬O¨Ï¥Î [DBNum1]0
¦]¬°§Ú·Q­n§e²{¤Q ¤Q¤@ ¤Q¤G ©Ò¥H§Ú§ï¦¨  [DBNum1][$-ja-JP]G/³q¥Î®æ¦¡

TOP

¥H¤U¬O¸ÕµÛ½m²ßªºµ²ªG µ{¦¡«ÜÃlªø ½Ð¤j¤j­Ì«üÂI¤@¤U¬Ý¬Ý¦³¨S¦³¦a¤è¤£¾A¦X³o¼Ëªº¼gªk
½Ð§iª¾¤p§Ì  ½Ð°Ý¦pªG­n³]©w¦C¦L¤À­¶ªº­¶¼Æ½d³ò ¸Ó¦p¦ó¼g©O? ½Ð¤j¤j­ÌÀ°À°¦£
  1. Sub ´ú¸Õ½m²ß()
  2.     Application.ScreenUpdating = False

  3.     Dim A()
  4.     For I = 2 To Sheets.Count
  5.         ReDim Preserve A(I - 1)
  6.         A(I - 1) = Sheets(I).Cells(2, 2)
  7.     Next I
  8.    
  9.     G = Application.Max(A)

  10.     ActiveWorkbook.Save
  11.     For k = 1 To G
  12.         For I = 2 To Sheets.Count
  13.             Sheets(I).Select
  14.             If Format(Sheets(I).Cells(2, 2), "[DBNum1]0") = Format(k, "[DBNum1]0") Then
  15.                 If Sheets(1).Cells(6, 2) = "" Then
  16.                     Sheets(I).Range(Cells(1, 1).SpecialCells(xlCellTypeConstants), Sheets(I).Cells(1, 1).SpecialCells(xlCellTypeLastCell)).Copy Sheets(1).Cells(6, 2)
  17.                 ElseIf Sheets(1).Cells(6, 2) <> "" Then
  18.                     u = Sheets(1).Cells(1, 1).SpecialCells(xlCellTypeLastCell).Offset(2, 0).Address(0, 0)
  19.                     Sheets(I).Range(Cells(1, 1).SpecialCells(xlCellTypeConstants), Sheets(I).Cells(1, 1).SpecialCells(xlCellTypeLastCell)).Copy Sheets(1).Cells(Mid(u, 2), 2)
  20.                 End If
  21.             End If
  22.         Next I
  23.     Next k
  24.     Sheets(1).Select
  25.     Range(Cells(1, 1), Cells(1, 1).SpecialCells(xlCellTypeLastCell).Offset(0, 1).Address(0, 0)).Name = "Print_Area"
  26.    
  27.     Application.ScreenUpdating = True
  28. End Sub
½Æ»s¥N½X

TOP

¥Î¦r¨å±a¤J½s¸¹:
Xl0000176-1.rar (23.13 KB)

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-8-4 16:44 ½s¿è

¦^´_ 9# edmondsforum

½s¸¹­­©w 1 ~ 99
§ó¥¿ÀÉ:
Xl0000176.rar (23.88 KB)

TOP

¦^´_ 8# jcchiang


  ÁÂÁ¤j¤j¡A¤¤¤å¤j¼g±Æ§ÇªGµM«Ü³Â·Ð¡A
  ³Ì«á¡A¦pªG¬O¥H¯Â¼Æ¦r±Æ¦C©O¡A¨Ò¦p¤uµ{¶µ¦¸¸Ì­±¬O 1 2 3 4 5 ¡A 10 21 35 41 ¤§Ãþªº¸Ü
  ³o¼Ë¥i¥H¤£¥Î¤â§ï¤F¶Ü? ¦A«ô°U§A¤F

TOP

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

¦^ÂЭã¤j
1. ¤Q¥H¤W´N¬Oª½±µÅܦ¨ ¤Q¤@ ¤Q¤G¡B¤G¤Q¤@ ¡B¤T¤Q¤­¤§Ãþªº¡C
2.¦P¤@­Ó¤u§@ªí¤£¤Ó¥i¯à¸õ¸¹¡C
3.¤£¦P¤u§@ªí¤£·|¦P¸¹¡C
¨º¦pªG§ï¦¨¤¤¤å¼Æ¦r 1 2 3 4 5 6... 10 11 21 31 ¬O§_¥i¦æ©O

¤£¦n·N«ä ­ã¤j¡I§Ú·|ºÉ¶q¾a¦Û¤v¥h§äµ{¦¡½X!! :P

TOP

¥»©«³Ì«á¥Ñ jcchiang ©ó 2020-7-29 10:51 ½s¿è

¦^´_ 4# edmondsforum


­ã¤j¤w¸gÂI¥X«Ü¦h¥i¯àªº°ÝÃD,¥ý¥HÀɮתº¸ê®Æ°µµ{¦¡½Õ¾ã,¨ä¾l³¡¥÷½Ð¦Û¦æ­×§ï

Sub ex1()
Dim arr, a, c, B%, QQ%, R%
Dim sht As Object
Dim d As Object
Set d = CreateObject("Scripting.Dictionary")
Sheets("³æ»ù¤ÀªRÁ`ªí").Cells.Clear
arr = Array("¤@", "¤G", "¤T", "¥|", "¤­")  '¤uµ{¶µ¦¸
For Each sht In Worksheets
   If sht.Name Like "*³æ»ù¤ÀªR" Then
      With Sheets(sht.Name)
         For Each a In .Range(.[b2], .[b65535].End(3))
            For x = 0 To UBound(arr)
               If a.Value = arr(x) And Not d.Exists(a.Value) Then d.Add a.Value, sht.Name & "@" & a.Address   
            Next
         Next
      End With
   End If
Next
R = 6
For Each a In arr
   For B = 0 To d.Count - 1
      If a = d.keys()(B) Then
         c = Split(d.items()(B), "@")
         With Sheets(c(0))
            For QQ = 1 To 100
               If .Range(c(1)).Offset(QQ, 1) = "¤p ­p" Then Exit For
            Next
            .Range(c(1)).Resize(QQ + 2, 8).Copy Sheets("³æ»ù¤ÀªRÁ`ªí").Cells(R, 2)
            R = R + QQ + 3
         End With
       End If
      Next
   Next
With Sheets("³æ»ù¤ÀªRÁ`ªí")
   .Cells.Font.Name = "µØ±dÁõ®ÑÅéW5"
   .Cells.Font.ColorIndex = 1
   .[b5].Value = "¶µ¦¸"
   .[b5].HorizontalAlignment = xlCenter
   With .Range("B2:H2")
      .Merge
      .Value = "·PÁ³»¶®a±Ú°Q½×ª©"
      .HorizontalAlignment = xlCenter
      .Font.Bold = True
      .Font.Size = 16
   End With
   With .Range("B3:H3")
      .Merge
      .Value = "³æ»ù¤ÀªRªí"
      .HorizontalAlignment = xlCenter
      .Font.Underline = xlUnderlineStyleSingle
      .Font.Size = 14
   End With
   .Range("c4:H4").Merge
   .[c4].Value = "¤uµ{¦WºÙ¡G³Â»¶®a±Ú°Q½×ª©"
   .Range("c5:H5").Merge
   .[c5].Value = "¤uµ{½s¸¹¡GExcelvba"
   .Range(.[b6], .Cells(.[c65535].End(3).Row, 8)) = .Range(.[b6], .Cells(.[c65535].End(3).Row, 8)).Value
End With
Set d = Nothing
End Sub

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-7-28 12:52 ½s¿è

¦^´_ 5# edmondsforum


1.³æ»ù¤ÀªRÁ`ªíªº¶µ¦¸¡A¯à¨Ì·Ó¦U¤l¶µ³æ»ù¤ÀªR½s¸¹ ¤@ ¤G ¤T ¥| ¤­ ¨Ì·Ó±Æ§Ç½Æ»s¹L¨Ó¶Ü?  

1) ³Ì¦h¨ì´X? 10¥H¤W,¤S¬O«ç»ò¼Ð?
   10 = "¤@¤Q" ©Î "¤Q" ©Î  "¤@¡³"
   12 = "¤Q¤G" ©Î "¤@¤Q¤G"

2) ¦P¤@¤u§@ªí¡A·|¤£·|¸õ¸¹¡H ©Î¦P¸¹
3) ¤£¦P¤u§@ªí, ·|¤£·|¦P¸¹?

¤¤¤å¤j¼gªº¼Æ¦r, ³o¤£¤Ó¦n§Ë~~³Ì¦n¦Û¦æ¥ý±N¤u§@ªí¶¶§Ç¤â°Ê½Õ¤@½Õ~~©Î©w¸q¤u§@ªí¦WºÙ¶¶§Ç
¦Ü©ó¤å¦rÃC¦â¤Î®æ¦¡, À³¸Ó¤£Ãø, ¥i¦Û¦æ¥h­×§ï©Î¸É¤Jµ{¦¡½X~~¼Ë¼Ë¦ù¤âµP¤£¬O¦n²ßºD


======================================

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD