Posts by coreycore02

    Re: Assign random name to selected cell


    Quote from StephenR;769670

    Perhaps like so.

    Code
    1. Sub Button1_Click()
    2. Randomize
    3. With Range("A1").CurrentRegion
    4. ActiveCell = .Cells(WorksheetFunction.RandBetween(1, .Rows.Count))
    5. End With
    6. End Sub



    Thanks so much, this worked exactly like I needed

    I have a list of names in column A and what I would like to do is select an empty cell and have a macro assigned to a button that when pressed, assigns the random name to said cell. Repeating names are ok.


    Basically I will have a list of tasks and would want to assign a name, randomly, to each task. These tasks wouldn't be assigned in bulk, it would be one at a time as I receive them, enter them into my worksheet, and assign them.


    Any help would be greatly appreciated, thanks :)