¦Û°Ê¡i§PŪ¦³¼Ð¥Ü«ü©w©³¦âªº¼Æ¦r¦¸¼Æ¡j&¡i¦¸¼Æ¥[Á`¡j&¡i¿é¥XÀɮסj¤§»yªk¡C
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
¦^´_ 25# Scott090
µ²ªG¦pªþ¤Wªº2019-0405_²Îp©M2019-0406_²Îp~µª®×¤£¹ï^^" |
|
|
|
|
|
|
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
¥»©«³Ì«á¥Ñ Airman ©ó 2019-5-6 00:44 ½s¿è
©Ó¤W¼Ó~
¨þ~¨þ~¬O¤p§Ì±N¦C115~¦C119"¤£°õ¦æ"~´ú¸Õ«á¡F
§Ñ¤F«ì´_ì½Z^^" |
|
|
|
|
|
|
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
¦^´_ 22# Scott090
Scott090¤j¤j:±z¦n!
n§âµ{¦¡Àɸò¸ê®ÆÀÉ©ñ¦b¦P¤@¸ô®|~¦³
½Ð°Ý¦³¥X²{¦p¤W¹Ï¦³ÀɮצWºÙªº¤u§@ªí¶Ü?~¦³
¤£¾å±o¬O¤°»òì¦]?²{¦b«o¥i¥¿±`°õ¦æ^^
¦ý¿é¥X«áªºµª®×Àɤº®e¤£¥¿½T^^"
·Ð½ÐÀ˵ø©M½ç¥¿¡C
ÁÂÁ±z!±ß¦w!
(§¡È±Æ§Ç).rar (68.7 KB)
|
|
|
|
|
|
|
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
|
|
|
|
|
|
- ©«¤l
- 519
- ¥DÃD
- 54
- ºëµØ
- 0
- ¿n¤À
- 595
- ÂI¦W
- 258
- §@·~¨t²Î
- win 10
- ³nÅ骩¥»
- []
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-3-19
- ³Ì«áµn¿ý
- 2024-11-25
|
¥»©«³Ì«á¥Ñ Scott090 ©ó 2019-5-5 21:16 ½s¿è
¦^´_ 19# Airman
©êºp¡A¸Õ¹BÂà«á¨S¦³ remark ' ®³±¼¡C
¤£¥Î¤H¤u¤JÀɦW
½Ð«¸Õ
Option Explicit
Option Base 1
''===================
Sub Main()
Dim wb As Workbook, sh As Worksheet, shSample As Worksheet, fpath$
Dim arColor%(7), arDATA
Dim i%, j%, k%, fileNo%, RowNo%, colNo%
Dim Cat$ 'Àɮרt¦C¥N½X
Dim colorNo% '©³¦â¼Æ
colorNo = 7
colNo = 49
ReDim arDATA(colorNo, colNo)
Application.ScreenUpdating = False
fpath = ThisWorkbook.Path
'¨ú±o±ýµû¦ôªºÀÉ®×
'================
getFileNames
'¨úÀx¦s®æ©³¦âªíCaeColor
'==================
Set shSample = ThisWorkbook.Sheets("Sample")
With shSample
colorNo = 7 '7ºØ©³¦â
For i = 1 To colorNo
arColor(colorNo - i + 1) = .Cells(i + 1, 1).Interior.ColorIndex
Next
End With
Set sh = ThisWorkbook.Sheets("FileNameSh")
fileNo = 1: Cat = sh.Cells(1, 2)
Do While sh.Cells(fileNo, 2) <> ""
If sh.Cells(fileNo, 2) <> Cat Then GoSub FinishCatFile: Cat = sh.Cells(fileNo, 2)
DoEvents
Application.ScreenUpdating = False
Set wb = Workbooks.Open(fpath & "\" & sh.Cells(fileNo, 1))
RowNo = [B65536].End(xlUp).Row
If RowNo < 10 Then GoTo NextFile 'ì³W«h³] Rowno <10 «h¤£³B²z
RowNo = RowNo - 1 - colorNo
For i = 1 To colorNo '±q 1 ~ 7 ©³¦â
For j = 1 To colNo '±q 1~ 49 Äæ
For k = 0 To i - 1 '¬d®Ö³sÄò¬Û¦P©³¦â
If RowNo - k = 1 Then GoTo NextFile 'Àɮתº¦³®Ä¦C¼Æ¤ñ©³¦â¼Æ¤Ö¡ACellsªº¦C¤w¨ì²Ä1¦C
If Cells(RowNo - k, j + 1).Interior.ColorIndex <> arColor(i) Then GoTo NextCol
Next
arDATA(colorNo - i + 1, j) = arDATA(colorNo - i + 1, j) + 1
NextCol:
Next
NextColor:
Next
NextFile:
wb.Close (fpath & "\" & sh.Cells(fileNo, 1))
Set wb = Nothing
fileNo = fileNo + 1
Loop
GoSub FinishCatFile 'For the last one date code catagory
Exit Sub
FinishCatFile:
With shSample
.[b2].Resize(colorNo, colNo) = arDATA
.Copy
End With
Sheets("Sample").Name = "¤µ¤éÁ`ªí(§¡È±Æ§Ç) - " & Cat & "_²Îp"
On Error Resume Next
Kill fpath & "\" & "¤µ¤éÁ`ªí(§¡È±Æ§Ç)-" & Cat & "_²Îp.xls"
On Error GoTo 0
ActiveWorkbook.Close savechanges:=True, Filename:=fpath & "\" & "¤µ¤éÁ`ªí(§¡È±Æ§Ç)-" & Cat & "_²Îp.xls"
ReDim arDATA(colorNo, colNo) 'clear contents
Application.ScreenUpdating = True
Return
End Sub
'To get all file names into a working sheet
'=============================
Sub getFileNames()
Dim fs, Cat$
Dim sh As Worksheet
Dim fpath$
Dim i%, j%, R%
fpath = ThisWorkbook.Path
On Error Resume Next
Set sh = Sheets("FileNameSh")
If Err.Number <> 0 Then Sheets.Add.Name = "FileNameSh": Set sh = ActiveSheet
On Error GoTo 0
sh.Cells.Clear
With sh
fs = Dir(fpath & "\*.*")
Do Until fs = ""
Cat = Left(Right(fs, 16), 12)
If InStr(Cat, "(2019") <> 0 Then
R = R + 1
.Cells(R, 1) = fs
.Cells(R, 2) = Cat
End If
fs = Dir
Loop
With .Sort
.SortFields.Add Key:=[B:B]
.SetRange sh.UsedRange
.Apply
End With
End With
End Sub |
|
|
|
|
|
|
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
¥»©«³Ì«á¥Ñ Airman ©ó 2019-5-5 17:41 ½s¿è
¦^´_ 17# Scott090
Scott090¤j¤j:±z¦n!
¤£¦n·N«ä¡A¦]¬°«á¨Ó¤~ª¾¹D¶Q¸ÑµªÀÉ¡F¥²¶·±Nn§PŪªº©Ò¦³ÀɮצWºÙ»P¤é´Á¡A¥þ³¡¥ýµn¿ý¦b"FileNameSh"ªºAÄæ©MBÄæ¤~¯à°õ¦æ¡A
©Ò¥H¥Ø«eÁÙ¦b¬ã¨s«ç»òקï?¼È®É¨S¦³¦A´ú¸Õ¤F^^"
ã¤jªº¸ÑµªÀÉ¡A¦³¸Õ¹L200ÓÀÉ®×~·Pı¬O1¤À¦hÄÁ~¦]¬°¨S¦³¥[¼gp®É½X¡A©Ò¥H¤£ª¾¥¿½Tªº¯Ó®É¬O¦h¤Ö?^^ |
|
|
|
|
|
|
- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
|
|
|
|
|
|