Hello everyone,
I have this code
Is there a way, i can add on the code, shuffle capabilities? So when i run it, the end result will be shuffled it's values? Ty in advance
I have this code
Code:
[COLOR=#000000][FONT="]Sub CopyData()[/FONT][/COLOR]
[COLOR=#000000][FONT="]Dim Rng As Range[/FONT][/COLOR]
[COLOR=#000000][FONT="]Dim InputRng As Range, OutRng As Range[/FONT][/COLOR]
[COLOR=#000000][FONT="]xTitleId = "Lottery"[/FONT][/COLOR]
[COLOR=#000000][FONT="]Set InputRng = Application.Selection[/FONT][/COLOR]
[COLOR=#000000][FONT="]Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)[/FONT][/COLOR]
[COLOR=#000000][FONT="]Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)[/FONT][/COLOR]
[COLOR=#000000][FONT="]Set OutRng = OutRng.Range("A1")[/FONT][/COLOR]
[COLOR=#000000][FONT="]For Each Rng In InputRng.Rows[/FONT][/COLOR]
[COLOR=#000000][FONT="] xValue = Rng.Range("A1").Value[/FONT][/COLOR]
[COLOR=#000000][FONT="] xNum = Rng.Range("B1").Value[/FONT][/COLOR]
[COLOR=#000000][FONT="] OutRng.Resize(xNum, 1).Value = xValue[/FONT][/COLOR]
[COLOR=#000000][FONT="] Set OutRng = OutRng.Offset(xNum, 0)[/FONT][/COLOR]
[COLOR=#000000][FONT="]Next[/FONT][/COLOR]
[COLOR=#000000][FONT="]End Sub[/FONT][/COLOR]
Is there a way, i can add on the code, shuffle capabilities? So when i run it, the end result will be shuffled it's values? Ty in advance