在行数据后插入文本到最后一个单元格中

我做了两张突出差异的比较。 在我的VB /macros代码,我复制丢失的ID到一个新的工作表。

这是代码片段:

If IsError(int_row_id) Then 'ID missing id.EntireRow.Copy missing.PasteSpecial xlPasteValuesAndNumberFormats Application.CutCopyMode = False Set missing = missing.Offset(RowOffset:=1) 

所以如果ID缺失,那么复制整个行,并将其粘贴到表中缺less。 我想要做的是在粘贴数据后的下一个单元格中的这一行数据的末尾添加短语“从新数据丢失”

任何build议将被认真考虑!

 If IsError(int_row_id) Then With Sheets("missing") last_row = .Cells(Rows.Count, 1).End(xlUp).Row id.EntireRow.Copy Destination:=.Range("A"&last_row+1) last_column = .Cells(last_row+1, .Columns.Count).End(xlToLeft).Column .Cells(last_row+1, last_column+1) = "Missing from New Data" End With