Hi, everyone. I need a helping hand.
I'm trying to create a tool that splits the name and last name in a cell into three cells (one cell for the first name and the other two for both last names, as we have two last names in Spanish). I got the last names thing, but I'm still struggling with the first name because of the following:
We can add prepositions and articles to both first and last names in Spanish (for example, "de la Rosa" would be just one last name). In Spanish, you can only have two last names (apart from prepositions and articles preceding them), but you can have as many first names as you want (typically two or, very rarely, three), and they may also include prepositions (for example, María de los Ángeles is somebody's first name). My tool is able to split "Javier" / "del Pino" / "Fernández" with no problems, but it is struggling to split first names with prepositions (such as "María de los Desamparados Medina de la Rosa" or "Juan de Dios de Alcántara Bayarri"). That's why I feel my formula is useless and I need to create it from scratch, but I don't even know where to begin at this point.
I need a formula that will extract the first name, which is always going to be the full name minus the two last names and their respective prepositions. I feel like this is probably very easy, and I feel just very dumb for not getting this to work. A complete list of articles and prepositions would be: "de", "del", "de la", "de los", "de las", "el", "la", "los", "las", in case it helps. All help is very much welcome.
I'm trying to create a tool that splits the name and last name in a cell into three cells (one cell for the first name and the other two for both last names, as we have two last names in Spanish). I got the last names thing, but I'm still struggling with the first name because of the following:
We can add prepositions and articles to both first and last names in Spanish (for example, "de la Rosa" would be just one last name). In Spanish, you can only have two last names (apart from prepositions and articles preceding them), but you can have as many first names as you want (typically two or, very rarely, three), and they may also include prepositions (for example, María de los Ángeles is somebody's first name). My tool is able to split "Javier" / "del Pino" / "Fernández" with no problems, but it is struggling to split first names with prepositions (such as "María de los Desamparados Medina de la Rosa" or "Juan de Dios de Alcántara Bayarri"). That's why I feel my formula is useless and I need to create it from scratch, but I don't even know where to begin at this point.
I need a formula that will extract the first name, which is always going to be the full name minus the two last names and their respective prepositions. I feel like this is probably very easy, and I feel just very dumb for not getting this to work. A complete list of articles and prepositions would be: "de", "del", "de la", "de los", "de las", "el", "la", "los", "las", in case it helps. All help is very much welcome.