How can i keep a log of deleted cells


Posted by Junsport on December 27, 2001 6:57 AM

I need to delete duplicated amounts from 3 (ABC) list and I need to create a log of what numbers were deleted and from what list they came from. How Can I do this? Thanks for your help.

Posted by Joe Was on December 27, 2001 7:18 AM

Build a macro to cut and paste your selection to a new sheet, using "xlUp" to find the next blank row on your deleted data sheet. JSW

Posted by junsport thanks on December 27, 2001 7:31 AM

Thanks, but Im new at all this. How can i amke the macro and use "xlUp"



Posted by Joe Was on December 27, 2001 8:25 AM

Sub CopySlect()

'Copy current selection, cell or range.
Application.ScreenUpdating = False
Worksheets("Sheet1").Select

'Paste Sheet1 data to Sheet2, starting in column B down, add new data to bottom of list.
Selection.Copy Destination:=Worksheets("Sheet2").Range("B65536").End(xlUp).Offset(1, 0)

'Delete current selection.
Application.CutCopyMode = False
Selection.ClearContents
Application.ScreenUpdating = True

End Sub

Copy the above code to a module then attach a hot key to the macro or build a form button and attach the macro. The above code will take the current selection, cell or range, on sheet1(you may need to change this name in the macro)and copy it to sheet2(you may need to create a data sheet for deletes, change sheet2 to the name of your data sheet), then delete the current selection and stay on sheet1 at the current selection. JSW