mercredi 10 juin 2015

Reduce the if-statement itself

This is my if-statement at the moment:

if (excel_getValue("A" + i) == "" && excel_getValue("A" + (i + 1)) == "" && excel_getValue("A" + (i + 2)) == ""
        && excel_getValue("A" + (i + 3)) == "" && excel_getValue("A" + (i + 4)) == "" && excel_getValue("A" + (i + 5)) == ""
        && excel_getValue("A" + (i + 6)) == "" && excel_getValue("A" + (i + 7)) == "" && excel_getValue("A" + (i + 8)) == "")

Is there anyway I can reduce this statement? Should I build this if-statement in a for-loop?

BTW, this if-statement if already in a forloop and it uses the i of the forloop

Aucun commentaire:

Enregistrer un commentaire