Hi,
If I understand correctly you want to pick 12 of these 20 numbers and put
them in B1 to M1 with no repeats. If so try this small macro.
ALT+F11 to open vb editor. Right click 'ThisWorkbook' and insert module and
paste the code in. Change the sheet name to the correct one and run it.
Sub Marine()
Dim FillRange As Range
Set Sht = Sheets("Sheet2") ' Change to suit
Set FillRange = Sht.Range("B1:M1")
For Each c In FillRange
Do
c.Value = Sht.Range("A" & Int((20 * Rnd) + 1))
Loop Until WorksheetFunction.CountIf(FillRange, c.Value) < 2
Next
End Sub
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.