Parse out characters in an Excel cell

Posted on 2011-10-12
Last Modified: 2012-08-14
Hi there,
Wondering if anyone can help me out here...I have a file where in one cell, it has the Full Name and their email address. What I would like is to just capture on the adjacent cell, the name before the @ symbol within the email address. Would it be possible? Logon Names
So the end look would be this:
B                                                      C
John Smith (         jsmith

Thanks for your help, and please let me know if you need additional info/details...

Much appreciated,
Question by:Classic1
    LVL 50

    Accepted Solution

    With data in B2 try this formula in C2 to extract the information you need


    regards, barry

    Author Closing Comment

    Wow...thanks for the quick replay, barryhoudini, that worked exactly to a tee!!!

    Just breaking down the syntax, you're using a MID function and using the FIND function to find the "@" symbol and start going LEFT 1 spot  previous (-1). Then stop just before the "(" symbol (+1). The 99 is just in case there's more than 99 characters in the string?

    Much appreciated!!!
    LVL 50

    Expert Comment

    by:barry houdini
    Yes, it's a little like that but not quite....

    This part


    finds the position of the @ and then when you use that in LEFT function like this


    that gives you everything to the LEFT of the @, e.g. for your example

    John Smith (jsmith

    Now you use that within the MID function taking  everything from the position of the ( for 99 characters (or the end of that substring).

    If you use REPLACE instead of MID then the limit of 99 is immaterial, i.e.


    regards, barry

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now