samedi 5 janvier 2019

how to not enter if statement inside a loop if it have been executed

I have a for loop, and inside it i have if statement.

In my Excel I have a list that contains each value one time. Once I found it i don't want the code to even check the conditional, i want it to skip this part of the if statement completely each time the loop is executed, is it possible?

Here is my code and list: Here is my code and list

the first iteration of the loop will find that "c" is the value so it will do what inside it (xc = i)

I don't want the code to even check "ElseIf Cells(1, i) = "c" again, like the following image, is this possible?

what i want

Aucun commentaire:

Enregistrer un commentaire