So, in my 3 weeks at my new job, I've been tasked with some very repetitive data entry pieces into Microsoft Excel. I'm writing this page with the hope that somebody else will run into my problem and this will point them in the right direction. I created a Macro, which repeats a specific task by a shortcut on the keyboard, but I wanted it to repeat a certain number of times. I spent hours on the internet trying to figure out how to make it happen and I finally found a website that did it for me.
You can see it here. Its pretty good in general and intro visual basic programming.
http://www.anthony-vba.kefra.com/vba/excelvba-simulation.htm#For_..._Next_
Basically after you record your macro, you put this line of code at the top.
For i = 1 to 3 (the number 3 can be replaced by the number of times you want to repeat the macro in a row.)
Then on the line above the End Sub line, you insert Next i. I'm not sure how it all works and what it all means, but this basically says repeat the macro code 3 times.
Anyway, I've been struggling with this for my 3 weeks here in Georgia, and the light bulb finally went off in my head today!
4 years ago
3 comments:
Neeeeeeeeeerd!!!
your soon to be brother in law probably knows this in both English and German!
I could have told you that. Call me next time and I'll let you in on all the 'macro!'
Post a Comment