Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Alpha Spilt of Surnames

    Aplogises, if I dont explain this one very well, I'll do my best,

    I'm using an Excel Sheet to record incomming work.

    I would like to cut down some manual input by getting Excel to do a simple calculation for me.

    Work is split across two teams, on an aplha split basis.

    Team 1 deals with any surnames from A-L
    Team 2 deals with any surnames from M-Z.

    The two columns that I'm dealing with is:

    NAME and TEAM

    To make it more interesting the names are inputted as: Firstname first and surname second such as:

    AUTO ALPHA SPILT.bmp

    I would like excel to auto-populate the next column (ie TEAM) by inserting either a 1 or 2, based on the surname split as mentioned above.

    What is the best way to achieve this, by way of forumla or Macro, can anyone help me create this?
    Last edited by RAISH; 2011-07-25 at 12:57.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Raish,

    This should solve your problem: =IF((CODE(UPPER(MID(A2,SEARCH(" ",A2)+1,1)))-64<13),1,2)

    Note: the formula ignores capitalization. However, Middle initials/names will trip it up.
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. The Following User Says Thank You to RetiredGeek For This Useful Post:

    RAISH (2011-07-26)

  4. #3
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by RetiredGeek View Post
    Raish,

    This should solve your problem: =IF((CODE(UPPER(MID(A2,SEARCH(" ",A2)+1,1)))-64<13),1,2)

    Note: the formula ignores capitalization. However, Middle initials/names will trip it up.
    Thanks for that, We dont use middle names so that should be rock solid for us. Thats brillant. This will help save abit of time. Every little helps.


    Can I ask another one?

    How do you get Excel to automatically insert a particular word into a column, say for arguements sake the word "TEST", if the user has in a previous column typed the word FEE? (picture below) Again would this be better done as a macro or forumla?, given that the result also occupies this same field as the above example.

    specific word.bmp


    Thanks for all the help.

  5. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    Something like this?
    =If(A2="Fee", "TEST",IF((CODE(UPPER(MID(A2,SEARCH(" ",A2)+1,1)))-64<13),1,2))

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •