This formula works well to return a random traveldestination1 value if it does find a match for C1 in the moderange range. It goes to #N/A otherwise:
=IF(MATCH(C1,moderange1,0),INDEX(traveldesination1,RANDBETWEEN(1,COUNTA(traveldesination1))),"nope")
How can I improve the formula to search another moderange range (non-adjacent) if a match for C1 is not found in moderange1 (it returns #N/A) (or moderange2 or moderange3 etc...)? It never actually gets to the point of displaying “nope” in this current formula so any code I add there doesn’t get used.
If it doesn't find a match in moderange1, I want it to search moderange2 and if it finds a match there, it should pick a random from traveldestination2 and so on.
Aucun commentaire:
Enregistrer un commentaire