Hi, i have a list of names in a sheet called "names"; is it possible to write something which will pick 2 random names from the list and join them together in a cell "name 1 and name2" for example ?
Thanks for your help
Tinkerbelle
Hi, i have a list of names in a sheet called "names"; is it possible to write something which will pick 2 random names from the list and join them together in a cell "name 1 and name2" for example ?
Thanks for your help
Tinkerbelle
Tinkerbelle,
Try this function.
Copy and paste the function into a standard module. In a cell on your worksheet you will put "=RandomName(starting row, ending row)". This will get you "random name 1 and random name 2" in that cell. This function assumes that your name list is in Col A. You can copy and paste to different cells to get a list of random names.![]()
Please Login or Register to view this content.
Give it a try and let me know what happens.
Sincerely,
Jeff
Thanks Jeff, this works well, but with a small problem.
Can it be changed so that it recalculates on the F9 key ?
So the 2 word random phrase changes everytime you press the F9 key?
Hope that isnt too difficult.
Thanks
Tinkerbelle
Tinkerbelle,
Add
right after the Dim statements.![]()
Please Login or Register to view this content.
Where ever you have used the function delete it and put it in again. This will cause the change to take effect. After that each time you press F9 your list should change. The only drawback is that anytime you change anything on the sheet your list is going to change. The F9 key is just forcing this to happen when you haven't actually changed anything.
Hope this is what you are needing.
Thank you Jeff, just what I was after.
Tinkerbelle,
Glad of could be of help! It was certainly my pleasure!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks