Alt+F11, to go to vb editor, right click on the left side icon, then insert a module to the workbook, click the module, and on the right blank area add the code below
Sub displayName()
On Error Resume Next
uname = InputBox("Please enter user name", "Give me a name")
ntime = InputBox("Number of times to repeat the name", "Give me a number")
For a = 1 To Int(ntime)
myline = myline & uname & " "
Next
MsgBox myline, vbOKOnly, "Display name"
End Sub
Go back to excel worksheet, Alt+F8, run macro displayName, then you're done
If you need error checking on the number input, making sure its positive integer add this
rptQ:
before ntime = InputBox("Number of times to repeat the name", "Give me a number")
and the following line after
If ntime * 1 <> Int(ntime * 1) Or ntime * 1 < 1 Or WorksheetFunction.IsNumber(ntime * 1) = False Then GoTo rptQ:
Please contact for more info