Make a deleted entry appear elsewhere and remain in a 2nd cell

M

mrlanier

If I have an entry in A1 and decide to delete it, can I make it appear
in B1 as a result of the deletion? I want it to remain in the second
cell. If I delete a later entry in A1, can it be made to go to B2?
In other words, if everytime I delete an entry in A1, can all those
deleted entries be made to fall one after another in column B (B1, B2,
B3, etc.)? Thanks.

Michael
 
D

Don Guillett

Assign to a button.

Sub cuttoendofcolumn()
If ActiveCell.Address <> "$B$1" Then Exit Sub
lr = Cells(Rows.Count, "b").End(xlUp).Row + 1
ActiveCell.Cut Cells(lr, "b")
End Sub
 
G

Guest

Enter the following is Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A:A"), Target) Is Nothing Then
Else
If Target.Value = "" Then
Application.EnableEvents = False
Target.Offset(0, 1).Value = v
Target.Offset(0, 1).Select
Application.EnableEvents = True
End If
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("A:A"), Target) Is Nothing Then
Else
v = Target.Value
End If
End Sub


and in a standard module enter:

Public v As Variant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top