Quote Originally Posted by Rick Rothstein View Post
Just so you know, my code works fine, even against the email addresses in the file you posted in Message #36 (I just tested it). If you are getting a #NAME? error, it is because you did one of two things wrong... either you put the code in the wrong place (it needs to go in a general Module, the same kind of module that macros go in) or you spelled the function name incorrectly when you used it in your formula. I will say, though, that my function (and I would guess most other functions) will return the wrong text for the first email address in your posted file, namely this one...

"thanks for the email man hit me at moneymankp@yahoo.com.LOOKING FOR MANAGEMENT!!!"

My function will return moneymankp@yahoo.com.LOOKING as the email address, not moneymankp@yahoo.com which is what you would be wanting it to. Notice that the quoted text above also assumes moneymankp@yahoo.com.LOOKING is the email address (it should be highlighted in blue and underlined)... that is because an email address can have more than one dot after the @ sign and because LOOKING are all valid characters for use in an email address.



It sounds like you put the formula in a cell formatted as TEXT. Try changing the cell format to General and then re-enter the formula.

Hey Rick, this workaround for the cell formats has not been working for me. In the actual field I see the email address, but in the formula field I'll see something to the effect of =extractemail(F2035), and selecting the General cell format both before and after applying the formula does not change this. My only option has been to save the file as a csv, but that also removes all kinds of highlighting that I have on the files. Do you have any other ideas about how I can fix this problem?

Thanks again for your help with all this.