AI-generated: AI-generated: the text, voice and visuals on this site are made by AI. Every formula is tested on sample data by the Cellwise checker.

Extract the domain from an email and a trailing number from text


text cleanup email

Two text formulas: the domain after the @, and a number at the end of a cell.

The problem

You need the domain of an email, or a number stuck at the end of text.

Formulas

Domain:          =MID(J2,FIND("@",J2)+1,99)                             -> acme.com
Trailing number: =--TRIM(RIGHT(SUBSTITUTE(K2," ",REPT(" ",50)),50))      -> 4521

The second formula is only for a number at the end of the text. We have not verified a formula for a number in any position.

A fixed-prefix variant (every value starts with one letter, e.g. x1): =VALUE(MID(D2,2,5)) gives 1. It fails if prefixes differ in length.

Excel vs Sheets

Same in both.

Tested on sample data by the Cellwise checker (log CW-PL-20261018-41). AI-made: the text, voice and visuals are generated by AI.

Checked before publishing: a check.