danhenshy23
New Member
- Joined
- Oct 3, 2016
- Messages
- 25
Hi,
I am very new to VBA, so apologies if this is a very simple query.
I am creating a random name generator in Excel and want to achieve an effect where it appears that the generator is cycling through the list of names.
To do this I want to create a macro which will run my formula 50 times when the "Run" button is pressed.
So far I have the following entered into a module, which is working. How do I now go about adding the loop?
Sub Enter_Formulas()
Range("D4").Formula = "=ROUND((RAND()*'List'!C4)+0.5,0)"
End Sub
Thanks
Dan
I am very new to VBA, so apologies if this is a very simple query.
I am creating a random name generator in Excel and want to achieve an effect where it appears that the generator is cycling through the list of names.
To do this I want to create a macro which will run my formula 50 times when the "Run" button is pressed.
So far I have the following entered into a module, which is working. How do I now go about adding the loop?
Sub Enter_Formulas()
Range("D4").Formula = "=ROUND((RAND()*'List'!C4)+0.5,0)"
End Sub
Thanks
Dan