jbb897 Posted October 13, 2021 Report Share Posted October 13, 2021 Hi all - first time poster, and I am fairly new to Macro Express (but I love it so far). I am trying to figure out how to run commands within an Excel spreadsheet, and the goal is to have specific commands like "Enter" or "Arrow Up" increase by one with each Macro pass/repeat. I know I can do this by copying the block of macro commands in Macro Express 500 times, and add an additional "Enter" command or "Arrow Up" command with each subsequent block of commands, but doing it this way is painful. There has to be some kind of "counter" that I can use to do the below...? Pass #1 <TEXTTYPE:<CTRL>c <TEXTTYPE:<ENTER> <TEXTTYPE:<ARROW UP> Pass #2 <TEXTTYPE:<CTRL>c <TEXTTYPE:<ENTER> <TEXTTYPE:<ENTER> <TEXTTYPE:<ARROW UP> <TEXTTYPE:<ARROW UP> Pass #3 <TEXTTYPE:<CTRL>c <TEXTTYPE:<ENTER> <TEXTTYPE:<ENTER> <TEXTTYPE:<ENTER> <TEXTTYPE:<ARROW UP> <TEXTTYPE:<ARROW UP> <TEXTTYPE:<ARROW UP> ...repeating the above 500+ times where "Enter" and "Arrow Up" increase by 1 each repeat. Thanks! Quote Link to comment Share on other sites More sharing options...
rberq Posted October 13, 2021 Report Share Posted October 13, 2021 Set counter to zero Repeat 500 times Add one to counter <TEXTTYPE:<CTRL>c Repeat counter times <TEXTTYPE:<ENTER> Repeat end Repeat counter times <TEXTTYPE:<ARROW UP> Repeat end Repeat end Watch out for timing issues -- if the macro typing gets ahead of how fast Excel can handle it, you will not be in a happy place.😞 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.