Hi,
I'm writing a macro that does a copy and paste from a table to another workbook - this workbook is then used for a mail merge.
Part of the macro also then saves what has been copied back to a history table. Which can then be used to track when/which batch records were last mailed.
My problem. When do the paste back to the history table, then some kind of ghost value is coming across in blank cells in a column. Any formula that references this column immediately goes to a #Value error.
If i manually select blank cells and hit DELETE - then the formulas right themselves. I've tried the following code. Including skipblanks set to true. As soon as this paste completes, my formulas go to #Value, how can i stop these "ghost" values (whatever they are) messing up my formulas?!
MyWbk.Activate
Sheets("History Table").Activate
' Add a row to the bottom of the history table
Sheets("History Table").ListObjects(1).ListRows.Add
' find the extent of the range in the other workbook
Lstcol = NewWbk.Sheets(1).Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
Lstrow = NewWbk.Sheets(1).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
' activate the workbook and copy the range
NewWbk.Activate
NewWbk.Sheets(1).Range(Cells(2, 1), Cells(Lstrow, Lstcol)).Copy
' paste the range to the bottom the history table
MyWbk.Activate
Lstrow = Sheets("History Table").ListObjects(1).ListRows.Count
Sheets("History Table").ListObjects(1).ListRows(Lstrow).Range.Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, skipblanks _
:=True, Transpose:=False
Application.CutCopyMode = False
Bookmarks