沒有想象中的快捷方法輕易提取。
可以用壹小段代碼完成。按Alt+F11組合鍵,打開VBE窗口,執行"插入""模塊",復制下面代碼進去,在確保該工作表是活動工作表的情況下,點擊"運行"-"運行子過程"就能得到結果。
註意:如果粘貼時發現紅色錯誤提示,刪除語句間空行即可。
Sub Demo()
Dim Orng As Range
Dim Drng As Range
Dim Cell As Range
Dim i As Integer
With ActiveSheet
Set Orng = .UsedRange.Find("甲")
Set Drng = .UsedRange.Find("備註")
For Each Cell In .Range(Orng, .Cells(Rows.Count, Orng.Column).End(xlUp))
.Cells(Cell.Row, Drng.Column).ClearContents
For i = Cell.Column + 1 To Drng.Column - 1
If Not .Cells(Cell.Row, i).Comment Is Nothing Then
.Cells(Cell.Row, Drng.Column) = .Cells(Cell.Row, Drng.Column) & .Cells(Drng.Row, i) & "日" & _
"“" & Application.Clean(Replace(.Cells(Cell.Row, i).Comment.Text, .Cells(Cell.Row, i).Comment.Author & ":", "")) & "“" _
& vbCrLf
End If
Next i
Next
End With
End Sub
運行結果: