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

[µo°Ý] ¤u§@ªí¸ê®Æ¤ÀÃþ¥t¦s¤u§@ªí

[µo°Ý] ¤u§@ªí¸ê®Æ¤ÀÃþ¥t¦s¤u§@ªí

¦U¦ì, ¥»¤H¦³¤@WORKBOOK¤º¦³¸ê®Æ, »Ý­n¦bSORTING "¦a°Ï" ©M"²Õ§O" «á. «ö"¦a°Ï"¥t¦s·sWORKSHEET, ¨Ã¥H"¦a°Ï" §@¬°WORKSHEET¦WºÙ, ¦ý¤U¦CCODE¦³°ÝÃD, ¨D±Ð°ÝÃD©Ò¦b:D
¤u§@ªí¥t¦s (2).zip (22.65 KB)
  1. Sub TSsheet2()

  2. Application.ScreenUpdating = 0
  3. Dim rng As Range, d As Object, ws As Worksheet
  4. Set ws = ActiveSheet
  5. ws.AutoFilterMode = False
  6. c = [a5].CurrentRegion.Columns.Count
  7. Set d = CreateObject("scripting.dictionary")
  8. Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(1).Row, c))
  9. a = rng.Columns(3)
  10. For i = 2 To UBound(a)
  11.     d(a(i, 1)) = ""
  12. Next
  13. k = d.keys
  14. For i = 0 To UBound(k)
  15.     ws.Copy after:=Sheets(Sheets.Count)
  16.     ActiveSheet.AutoFilterMode = False
  17.     [a5].CurrentRegion.Clear
  18.     With ws
  19.         rng.AutoFilter Field:=1, Criteria1:=k(i)
  20.         .[a5].CurrentRegion.Copy [a5]
  21.         
  22.     End With
  23.         
  24.     ActiveSheet.Name = [A6].Value
  25. Next
  26. Application.ScreenUpdating = 1

  27. With Sheets("data").Activate
  28.     If ActiveSheet.FilterMode Then
  29.       ActiveSheet.ShowAllData
  30.     End If
  31.    
  32. End With

  33. End Sub
½Æ»s¥N½X

¹Á¸ÕµÛ³v¦æ¤À¸Ñ
µo²{²Ä9¦æ·í¤¤
Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(1).Row, c))

Rows.Count > ³oÃ䪺¸ê®Æ·|¸õ¨ì¾ã±iEXCELªí¤¤ªº³Ì«á¤@¦æ¡A¦³ÂI¬Ý¤£¤ÓÀ´±z­n°µªº¨Æ±¡¡A¦]¦¹¶È¯à§iª¾±zªº³o³¡¤À¶}©l´N¤w¸g¸õ²æ¥Xµ{¦¡¾Þ§@ªº¤º®e¤F
¬O§_¯àµy§@»¡©ú±z¨C¨BÆJ·Q°µªº¨Æ±¡©O¡H

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2024-12-11 19:48 ½s¿è

1.§ä³Ì«á«DªÅ¦æ, À³¨Ï¥Î xlup(3), ¦Ó«D (1)
Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(1).Row, c))
Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(3).Row, c))

2.¿z¿ïÄæ¦ì
a = rng.Columns(3) '¿z¿ï¤å¦r¦b²Ä3Äæ
rng.AutoFilter Field:=1, Criteria1:=k(i) '³o­Ó1À³§ï¦¨3

3.¤u§@ªí¦WºÙ
ActiveSheet.Name = [C6].Value

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD