Swap an old email domain for a new one

Turn ava@old.test into ava@new.test. Other domains stay as they are.

What you'll make

In Excel: ava@old.test becomes ava@new.test.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LOWER(TEXTAFTER(A8,"@"))=LOWER(B8)Checks the domain is the old one, in any capitals.TRUE
2TEXTBEFORE(A8,"@")Keeps the text before the @."ava"
3&"@"&C8Adds the @ and the new domain."ava@new.test"
4A8Any other email, left as it is.Not used for row 8
5IF( … )Gives part 3 for the old domain, otherwise part 4."ava@new.test"

Only an exact domain match changes, so mail.old.test stays.

=IF(LOWER(TEXTAFTER(A8,"@"))=LOWER(B8),TEXTBEFORE(A8,"@")&"@"&C8,A8)

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own list. Paste emails, the old domain and the new domain into the green columns of the Template tab. The new emails fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use this only when you know the same mailbox exists at the new domain.

Microsoft's help: TEXTAFTER function