ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make a deleted entry appear elsewhere and remain in a 2nd cell (https://www.excelbanter.com/excel-programming/382987-make-deleted-entry-appear-elsewhere-remain-2nd-cell.html)

[email protected]

Make a deleted entry appear elsewhere and remain in a 2nd cell
 
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


Don Guillett

Make a deleted entry appear elsewhere and remain in a 2nd cell
 
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

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
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




Gary''s Student

Make a deleted entry appear elsewhere and remain in a 2nd cell
 
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
--
Gary's Student
gsnu200705


" wrote:

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



[email protected]

Make a deleted entry appear elsewhere and remain in a 2nd cell
 
Thanks Don and Gary's Student.

Michael



All times are GMT +1. The time now is 07:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com