+ Reply to Thread
Results 1 to 6 of 6

Whose name comes first?

  1. #1
    Registered User
    Join Date
    09-24-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    28

    Whose name comes first?

    Hi All,

    So I have a list of couples set up the following way:

    A B C D E
    ID Primary First Name Primary Last Name Secondary First Name Secondary Last Name

    And in column F, I need to know which name comes first alphabetically by last name, and if the last name is the same, by first name. Basically, I need the formula that says:
    IF C2 comes before E2 Alphabetically, "P",
    IF E2 comes before C2 Alphabetically, "S",
    IF C2=E2 and B2 comes before D2 Alphabetically, "P"
    IF C2=E2 and D2 comes before B2 Alphabetically, "S"

    I have other columns to use if that makes it easier, so feel free.

  2. #2
    Registered User
    Join Date
    09-24-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    28

    Re: Whose name comes first?

    Figured out how to make a table in the post!

    A B C D E
    ID Primary First Name Primary Last Name Secondary First Name Secondary Last Name

    And in column F, I need to know which name comes first alphabetically by last name, and if the last name is the same, by first name. Basically, I need the formula that says:
    IF C2 comes before E2 Alphabetically, "P",
    IF E2 comes before C2 Alphabetically, "S",
    IF C2=E2 and B2 comes before D2 Alphabetically, "P"
    IF C2=E2 and D2 comes before B2 Alphabetically, "S"

  3. #3
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Whose name comes first?

    Guess that would need this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula returns "P" when all cells are equal. Not sure if that's what you want.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  4. #4
    Registered User
    Join Date
    09-24-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    28

    Re: Whose name comes first?

    That worked perfectly, thanks! I didn't know the less than/more than symbol worked for alphabetical stuff!

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Whose name comes first?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    09-24-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    28

    Re: Whose name comes first?

    Done, sorry Alan, didn't know about doing that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1