jeudi 26 février 2015

How to make a 'If Then' Loop in vba

I am a beginner in vba. I have a situation in which I would like to say if i=9, k=1 and if i=10, k=2 and if i=11, k=3 and it goes on and on


As i increases by one, k should increase by one too. But how do I say if i=1000, k=992. I cant type each one of the statement until i=1000.


So I was just wondering if there are any loops in which I can create here to make it easy. Any help would be deeply appreciated! Thanks


Aucun commentaire:

Enregistrer un commentaire