How about Spain does better in he war of Spanish succession? France is still defeated, but neither Gibraltar or Minroca fall, so Britain gains more territory at the expense of France instead.
As far I know Gibraltar and possibly Minorca simply surrendered to the Austrian candidate, but then Britain stabbed the Austrians in the back signing the Treaty of Utrecht and used her troops deployed there to back her "conquests".
A partition of New France, around 40 years earlier may be likely. In exchange for their gains at France's expense, Spain surrenders its claim to Andorra.
There isn't and never has been a Spanish claim to Andorra. It just happens that one of Andorra's princes is (usually) of Spanish nationality.