I have a excel workbook with several sheets, These sheets get deleted by a macro that I created but before I delete them I want to copy a range of cells and insert them into another sheet that will keep data for six months or longer. I have a macro started and it works for what I want but it also copies the cells that are left blank and also inserts them. Here is what I have so far, all I need is when it copies the range the blank ones are left out. Any help would be greatly appreciated.
Thank you in advance
Sub PostData()
Dim CopyRange As Range, NextCell As Range
Set CopyRange = Sheet2.Range("D625")
Set NextCell = Sheet5.Cells(Cells.Rows.Count, 1).End(xlUp).Offset(1, 0)
CopyRange.Copy
NextCell.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
Thank you in advance
Sub PostData()
Dim CopyRange As Range, NextCell As Range
Set CopyRange = Sheet2.Range("D625")
Set NextCell = Sheet5.Cells(Cells.Rows.Count, 1).End(xlUp).Offset(1, 0)
CopyRange.Copy
NextCell.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub