Hi everyone!
I'm currently working on a tool that automatically sorts a list of names. However, since some of these names may have prepositions in their last names (like "dalla", "von der" and such), I've added an option to remove them. This is the formula:
(where C4:C1000 is the name list that I want to sort — if G6 contains "Eliminar", the formula will delete the specified prepositions and articles and sort the names without them)
Now, my problem is the list of prepositions is getting bigger and bigger. I'd like to make a list of prepositions on a separate sheet (in my case, the preposition list is going to be located on the row 200 across all columns in a sheet that is called "Test sheet 1"). That way, the formula would just take the prepositions to delete from the list, so I don't have to add them to the formula one by one, which is very inconvenient.
Could you please help me with this? I've tried a few things, but I couldn't get it to work. Thanks so very much!
I'm currently working on a tool that automatically sorts a list of names. However, since some of these names may have prepositions in their last names (like "dalla", "von der" and such), I've added an option to remove them. This is the formula:
Excel Formula:
=LET(ord,SORT(IF($G$6="Eliminar",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C4:C1000," de los "," ")," de las "," ")," de la "," ")," del "," ")," de "," ")," el "," ")," la "," ")," los "," ")," las "," ")," y "," ")," i "," ")," dels "," ")," de les "," ")," les "," ")," els "," ")," De Los "," ")," De Las "," ")," De La "," ")," Del "," ")," De "," ")," El "," ")," La "," ")," Los "," ")," Las "," ")," Y "," ")," I "," ")," Dels "," ")," De Les "," ")," Les "," ")," Els "," "),C4:C1000)),FILTER(ord,ord<>""))
(where C4:C1000 is the name list that I want to sort — if G6 contains "Eliminar", the formula will delete the specified prepositions and articles and sort the names without them)
Now, my problem is the list of prepositions is getting bigger and bigger. I'd like to make a list of prepositions on a separate sheet (in my case, the preposition list is going to be located on the row 200 across all columns in a sheet that is called "Test sheet 1"). That way, the formula would just take the prepositions to delete from the list, so I don't have to add them to the formula one by one, which is very inconvenient.
Could you please help me with this? I've tried a few things, but I couldn't get it to work. Thanks so very much!