Hi There,
I'm looking for an alternative to a nested IF Statement. I work for a non-profit organization and we run several daycares. The spreadsheet I need to complete is to calculate kilometers between each daycare... we have 8 day cares. The way I have it set up is that each daycare is assigned a number. So if daycare number 1 travels to daycare number 3 the result is the calculated kilometers. The problem is, is that I have more that 64 nested IF statements in my calculation and ideally I'm looking for an alternative that will allow for MORE results, as we also run several family resource centres and I'd like to add them into the mix.
Does anyone have any suggestions??
My code currently looks like this:
=IF(AND(C8=1,D8=2),1,IF(AND(C8=1,D8=4),24,IF(AND(C8=1,D8=6),17,IF(AND(C8=1,D8=7),22,IF(AND(C8=1,D8=12),75,IF(AND(C8=1,D8=14),1,IF(AND(C8=1,D8=15),27,IF(AND(C8=1,D8=18),21,IF(AND(C8=2,D8=7),22,IF(AND(C8=2,D8=1),1,IF(AND(C8=2,D8=14),1,IF(AND(C8=2,D8=4),24,IF(AND(C8=2,D8=6),17,IF(AND(C8=2,D8=12),74,IF(AND(C8=2,D8=15),27,IF(AND(C8=2,D8=18),21,IF(AND(C8=4,D8=7),4,IF(AND(C8=4,D8=1),24,IF(AND(C8=4,D8=15),4,IF(AND(C8=4,D8=2),24,IF(AND(C8=4,D8=6),13,IF(AND(C8=4,D8=12),77,IF(AND(C8=4,D8=14),23,IF(AND(C8=4,D8=18),57,IF(AND(C8=6,D8=7),15,IF(AND(C8=6,D8=1),17,4,IF(AND(C8=6,D8=15),17,IF(AND(C8=6,D8=2),27,IF(AND(C8=6,D8=12),89,IF(AND(C8=6,D8=14),16,IF(AND(C8=6,D8=18),32,IF(AND(C8=6,D8=4),13,IF(AND(C8=12,D8=16),29,IF(AND(C8=12,D8=7),73,IF(AND(C8=12,D8=20),30,IF(AND(C8=12,D8=1),75,IF(AND(C8=12,D8=2),74,IF(AND(C8=12,D8=14),75,IF(AND(C8=12,D8=18),59,IF(AND(C8=14,D8=1),1,IF(AND(C8=14,D8=2),0,IF(AND(C8=14,D8=7),22,IF(AND(C8=14,D8=4),23,IF(AND(C8=14,D8=6),16,IF(AND(C8=14,D8=15),27,IF(AND(C8=14,D8=18),21,IF(AND(C8=14,D8=12),75,IF(AND(C8=15,D8=1),27,IF(AND(C8=15,D8=7),8,IF(AND(C8=15,D8=4),4,IF(AND(C8=15,D8=2),27,IF(AND(C8=15,D8=6),17,IF(AND(C8=15,D8=14),27,IF(AND(C8=15,D8=18),25,IF(AND(C8=15,D8=12),81,IF(AND(C8=18,D8=1),21,IF(AND(C8=18,D8=2),21,IF(AND(C8=18,D8=7),18,,IF(AND(C8=18,D8=12),59,IF(AND(C8=18,D8=14),21,)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
SEE WHAT I MEAN... I need something more similar!!
Thank you
Bookmarks