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.