• This topic has 21 replies, 12 voices, and was last updated 13 years ago by mrmo.
Viewing 22 posts - 1 through 22 (of 22 total)
  • Excel experts help please!
  • Pook
    Full Member

    I have a sheet with names and email addresses in column a and b.

    The names are in the format John Smith, and the email addresses are email addresses.

    I need a formula that will separate forename from surname, and deposit them elsewhere, but still corresponding visually with the email address.

    Basically, something that converts this

    John Smith | john@smith.com

    to this

    John | Smith | john@smith.com

    (where | is a separate column)

    Help! and thanks in advance!!!

    Stoner
    Free Member

    you can use the FIND, LEFT, RIGHT and LEN functions to control text separation (find the space and cut the left and right portions from the string around the space) or for a one off separation use “Text to Columns” from the menu bar (DATA menu item)

    Stoner
    Free Member

    to split a string with a single space:

    =LEFT(A1, FIND(” “, A1, 1))

    and

    =RIGHT(A1, LEN(A1)-FIND(” “, A1, 1))

    Stoner
    Free Member

    You will need to manually check for errors such as when you have 2x spaces or two first names etc. under either technique

    djglover
    Free Member

    Try this in cell A3 =left(A1,(find(” “,A1)-1))
    And this in A4 = right(A1,(len(A1)-find(” “,A1)))

    Sorry from memory and don’t have excel to hand but have had to do stuff like that in the past

    Pook
    Full Member

    Stoner, you’re a star. Cheers!

    djglover
    Free Member

    Stoner wins the excel geek prize

    damo2576
    Free Member

    or you could use SUBSTITUTE to sub . @ etc for a * then use text to columns on the *

    damo2576
    Free Member

    sorry i misread question!

    CharlieMungus
    Free Member

    would [DATA] [text to columns] not have worked?

    Pook
    Full Member

    Charlie, yeah it did. Damo, I’ve no idea what you’re on about!

    scaredypants
    Full Member

    move over you lot, I’ll handle this

    so, Pook, it’s error bars you’re after, yeah ?

    😉

    Pook
    Full Member

    I’ve made enough errors at bars not to get involved in such tomfoolery and shenanigans thankyou very much Mr Pants.
    😕

    CharlieMungus
    Free Member

    or did you want boxplots?

    plop_pants
    Free Member

    Are all the names just the two words? If you have middle names or middle initials etc finding the last word will be a bit harder.

    Use something like this:
    =if(iserr(find(” “,a1)),a1,right(a1,len(a1)-find(“*”,substitute(a1,” “,”*”,len(a1)-len(substitute(a1,” “,””))))))

    toys19
    Free Member

    all good, i would have had to export to txt file and reimport with spaces as separators…

    matthewjb
    Free Member

    Any names with more than one space can be sorted by using the TRIM function once you’ve chopped them up.

    palmer77
    Free Member

    +1 For Data | Text to Columns | Fixed Width | Insert Break Line

    CharlieMungus
    Free Member

    Surely Data | Text to Columns |Delimited – Space as separator

    palmer77
    Free Member

    While we are at it, who knows how to represent the percentage of individual items for the range? Just compiling an accident/incident record and have about 65 rows with the details of each accident/incident. I need to show the numbers for each group and the percentage but can’t figure out the statistic formulas. Help much appreciated 🙂

    geoffj
    Full Member

    If there are groups within the range, it would be easiest to use a pivot table.
    If you just wang percentages for the whole range, sum the total into a cell and divide by the individual entry.

    mrmo
    Free Member

    While we are at it, who knows how to represent the percentage of individual items for the range? Just compiling an accident/incident record and have about 65 rows with the details of each accident/incident. I need to show the numbers for each group and the percentage but can’t figure out the statistic formulas. Help much appreciated

    What you need if i understand your question is the frequency function. Allows you to create histograms and the like by grouping the data in to bands.

Viewing 22 posts - 1 through 22 (of 22 total)

The topic ‘Excel experts help please!’ is closed to new replies.