- 帖子
- 967
- 主題
- 0
- 精華
- 0
- 積分
- 1001
- 點名
- 0
- 作業系統
- WIN XP
- 軟體版本
- OFFICE 2003
- 閱讀權限
- 50
- 性別
- 男
- 來自
- 台北
- 註冊時間
- 2010-11-29
- 最後登錄
- 2022-5-17
 
|
回復 9# baa168 - Sub AA()
- Sheets("Sheet2").Columns("A:B") = ""
- Sheets("Sheet2").[A3] = "日期": Sheets("Sheet2").[B3] = "內容"
- T = 4
- With Sheets("Sheet1")
- For R = 4 To .Range("A65536").End(xlUp).Row
- If (Month(.Cells(R, "A")) <> Month(.Cells(R + 1, "A"))) Or (R = .Range("A65536").End(xlUp).Row) Then
- Sheets("Sheet2").Cells(T, "A") = Right(.Cells(R, "A"), Len(.Cells(R, "A")) - 5)
- Sheets("Sheet2").Cells(T, "A").NumberFormatLocal = "m/d;@"
- Sheets("Sheet2").Cells(T, "B") = .Cells(R, "B")
- T = T + 1
- End If
- Next R
- End With
- End Sub
複製代碼 |
|