Python Use Variable In Nested Ifs In Excel