View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Extract email addresses

Try this array formula

=MID(A1,MAX(IF((MID(A1,ROW(INDIRECT("1:"&LEN(A1))) ,1)="
")*(ROW(INDIRECT("1:"&LEN(A1)))<FIND("@",A1)),ROW( INDIRECT("1:"&LEN(A1)))))+1,
FIND(" ",A1&"
",FIND("@",A1))-1-MAX(IF((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)="
")*(ROW(INDIRECT("1:"&LEN(A1)))<FIND("@",A1)),ROW( INDIRECT("1:"&LEN(A1))))))

as an array formula, it is committed with Ctrl-Shift-Enter, not just Enter.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


<Andy wrote in message ...
Hi

I have been looking for an answer to this for weeks - and I admit defeat!
I have a column of data with email addresses in there, somewhere. Each
email is preceeded and followed by a space. There are also non-printing
'squares' in there - but I'm not sure if that makes a difference or not!
Sample text could be
This message has been returned .. . . address was and
this address . . . . . etc

So I am trying to extract the section of text with the @ sign, up to but
excluding the spaces at both ends.
Help me, please!
Andy.