Input to enter data in spreadsheet and repeat

Discussion, questions and support.
Post Reply
nicnaq
Posts: 11
Joined: Nov 15th, ’17, 20:38

Post by nicnaq » Nov 21st, ’17, 21:13

Using Excel 2016. I enter a lot of data that repeats. Is there a way to have a repeater such that it takes two inputs where Input 1 is the data and input 2 is a number (number of times to repeat). For example, I would like to enter the word "final" and then enter 42 and have it repeat "final" for 42 rows.
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 22nd, ’17, 09:22

This script will do it. Set it as a new shortcut, Type: Command:

Code: Select all

gui, MyGui:Default
gui, add, text,, Text
gui, add, edit, xp+50 yp vtext
gui, add, text, xm, Times
gui, add, edit, xp+50 yp w40 vtimes
gui, add, button, w75 gExecuteIt default, OK
gui, add, button, w75 xp+80 yp gMyGuiCancel, Cancel
gui, show
return

ExecuteIt:
gui, submit
loop % times
	sendinput %text%{Enter}
gui, MyGui:Destroy
return

MyGuiCancel:
MyGuiGuiClose:
MyGuiGuiEscape:
gui, MyGui:Destroy
return
nicnaq
Posts: 11
Joined: Nov 15th, ’17, 20:38

Post by nicnaq » Nov 22nd, ’17, 19:06

Thank you so much. This works great.
I do have a question: Is there a way to speed up the way it pastes the copies? It seems like there is a lag somewhere.
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 23rd, ’17, 16:00

Probably you would need to change some animation settings in Windows/Excel.
If you try it in Notepad, it is instant.
Post Reply