View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Delete Numbers and Produce a List

List starts in I1

Sub AA()
Dim Nums(1 To 49) As Long
Dim list() As Long, rng As Range
Dim hist As Long, cell As Range
Dim idex As Long, lastrow As Long
Dim i As Long

With Worksheets("Results")
hist = .Range("B2").Value
lastrow = .Cells(Rows.Count, 2).End(xlUp).Row
Set rng = .Cells(lastrow, 2).Offset(-1 * (hist - 1), 0).Resize(hist, 6)
For Each cell In rng
Nums(cell.Value) = Nums(cell.Value) + 1
Next
idex = 0
For i = 1 To 49
If Nums(i) = 0 Then
idex = idex + 1
.Cells(idex, "I").Value = i
End If
Next
End With
End Sub

--
Regards,
Tom Ogilvy

"Paul Black" wrote in message
oups.com...
Hi Everyone,

I have a List of 6 Number Combinations in Columns "B:G" in a Sheet
Named "Draws".
The Minimum Number is 1, and the Maximum Number is 49 within EACH 6
Number Combination.
I have a Sheet Named "Results", and in Cell "B2" I have a Figure of the
Number of Draws I want to go Back.
If the Figure in Cell "B2" is 20 for Example, that is the Number of
Draws I want to go Back ( Starting at the Bottom and Going Up ).
I then want to Produce a List of Numbers that have NOT Been Drawn in
those 20 Draws from the 49 Numbers Please.

Many Thanks in Advance.
All the Best.
Paul