How do I delete specific text in multiple cells at once?

Solution 1:

Unless I misunderstand, the best thing you can do here is use the Find and Replace

Find the email you want, and replace it with an empty value.

This may have negative effects on your H value though but if you find and replace manually (one at a time) it should be easy and quick enough.

A VBa solution - Take a back up first.

As per your example, I've assumed your look up starts at H1 and ends at some point.

I've also assumed the other data starts on A2 and ends some row in A

Option Explicit
Sub DoTheThing()
 Dim keepValueCol As String
 keepValueCol = "H"               'You may need to update this

 Dim row As Integer
 row = 2                          'what row do the values start in column A

 Dim keepValueRow As Integer
 keepValueRow = 1

 Do While (Range("A" & row).Value <> "")

    Do While (Range(keepValueCol & keepValueRow).Value <> "")

    Range("A" & row).Value = Replace(Range("A" & row).Value, Range(keepValueCol & keepValueRow).Value, "")
    Range("A" & row).Value = Trim(Replace(Range("A" & row).Value, "  ", " "))

    keepValueRow = keepValueRow + 1
    Loop


 keepValueRow = 1
 row = row + 1
 Loop

End Sub