- ©«¤l
- 47
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 116
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-1-14
- ³Ì«áµn¿ý
- 2012-3-10
|
[µo°Ý] (¤w¸Ñ¨M)°õ¦æµ{¦¡«á¸õ¥Xµøµ¡?
¥»©«³Ì«á¥Ñ candy516 ©ó 2011-6-3 18:22 ½s¿è
¦U¦ì«e½ú±z¦n~
§Ú¥Î¤F¤§«eHsieh«e½úÀ°§Ú¼gªºµ{¦¡¿z¿ï¸ê®Æ¡A¤§«e³£ÁÙ¥i¥H¥Î!
¦ý²{¦b¥Î³£·|¸õ¥X¤@¨Ç©_©ÇªºªF¦è¡A½Ð°Ý¦³¨S¦³¤H¥i¥HÀ°§Ú¸Ñµª¤@¤U©O?¥ýÁÂÁ¦U¦ì«e½ú!^^
(¦]ÀɮפӤj¡A§Ú¥ý±N01~09¦~¸ê®Æ§R°£¤F¡A¥u³Ñ2010¦~!)
µ{¦¡½X¦p¤U- Sub ex()
- On Error Resume Next
- Dim A As Range, B As Range, B1 As Range, B2 As Range, C As Range, Rng As Range, Rng1 As Range, d As Object
- Set d = CreateObject("Scripting.Dictionary")
- Set sht = Sheets.Add(after:=Sheets(1))
- Application.ScreenUpdating = False
- With Sheet1
- For Each A In .Range(.[A2], .[A65536].End(xlUp))
- mystr = A & "," & Left(A.Offset(, 1), 4)
- '§ASheet1ªºAÄæ¬O¥H¤é´Á®æ¦¡yyyy/m/d¿é¤J¡A¦ý®æ¦¡³]¦¨yyyymmdd¡A©Ò¥H¡A³y¦¨«D¥þ³¡¬°8½X
- '¥ÎTEXTÄݩʱo¨ì©Ò¨£¦r¦ê
- d(mystr) = DateValue(Format(A.Offset(, 1).Text, "0000/00/00"))
- If Err.Number <> 0 Then MsgBox A & A.Offset(, 1)
- Next
- End With
- k = 1: r = 1
- For Each ky In d.keys
- y = Split(ky, ",")(1)
- With Sheets(y)
- Set C = .Columns("A").Find(d(ky))
- Set B = .Rows(1).Find(Split(ky, ",")(0))
- If Not C Is Nothing And Not B Is Nothing Then
- x = Application.Max(3, C.Row - 14)
- Set Rng = .Cells(x, 1).Resize(15, 1)
- Set Rng1 = .Cells(x, B.Column).Resize(15, 1)
- With sht
- Rng.Copy .Cells(r, k)
- Rng1.Copy .Cells(r, k + 1)
- .Cells(r, 3) = y & "¦~²Ä" & B.Column - 1 & "µ§"
- End With
- r = r + 15
- Else
- MsgBox "µL¦¹°£Åv¸ê®Æ"
- End If
- End With
- Next
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|