Excel Workbook Delete on Master sheet should delete on other sheets

If I have on the tab "MASTER" a item in column A that is referenced by other sheets... and this item on the master sheet gets deleted, I want to make sure it is deleted in column A of the other sheets referencing it.  I don't want to delete the row from the other sheets, just delete the value in column A cell of the other sheets potentially referencing it.

On the attached example;
Sheet:  MASTER has a item 3
Sheet: A has item 3 selected in row 3
Sheet: B has item 3 selected in row 3

If I delete item 3 from the MASTER I want some VBA to go through and clean it up from column A in the other sheets.
DELETE-EXAMPLE.xlsx
maverick0728Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
try something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    Dim x, y
    With Application
        .EnableEvents = False
        x = Target.Value
        .Undo
        y = Target.Value
        Target.Value = x
        .EnableEvents = True
    End With
    If Len(x) + Len(y) = 0 Then Exit Sub
    Dim xVal$, yVal$
    If Len(y) > 0 Then
        yVal = "Old value: " & y & vbCrLf & vbCrLf
    Else
        yVal = ""
    End If
    If Len(x) > 0 Then
        xVal = "New value: " & x
    Else
        xVal = ""
    End If
    
    'MsgBox xVal & vbCrLf & yVal, , _
    "Value history of cell " & Target.Address(0, 0)

    'credit to: http://www.mrexcel.com/forum/excel-questions/163040-retrieving-old-target-value.html

    Dim ws As Worksheet
    
    For Each ws In Worksheets
        If ws.Name <> "Master" Then
            Sheets(ws.Name).Select
            Sheets(ws.Name).Range("A1:A100").Select
            'Columns("A:A").Select
            Selection.Replace What:=y, Replacement:="", LookAt:=xlPart, _
                SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
                ReplaceFormat:=False
        End If
    Next
    Sheets("Master").Activate
        
End Sub

Open in new window

DELETE-EXAMPLEb.xlsx
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maverick0728Author Commented:
That works perfectly.  Thanks Ryan.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.