Since this sounds a lot like a "want to learn" I'm gong to provide some instructions not code
Place the varaibles to search into an array
Search the array from the largest index to the smallest: Hint: DIM and by -1. This will tell you where you find the 0. Then search from that position forward to find the 1, if any.
You can get the name of an array member with the VNAME function.
... View more