Counting pairs
b_gold
If you are interested in getting only the number of times 2 specific numbers have come out, for each draw, you could use a formula such as :
IF(COUNTIF(Range;N1)+COUNTIF(Range;N2)=2;1;0) where Range is the range of the winning numbers and N1 and N2 the two numbers you are interested in. Then just add up the 1 you get and you have your answer.
Maybe more interesting is the Pairs macro given below which will list all pairs (1176 of them from 1-2 to 48-48 and the number of times they have come out. On Sheet1, have labels in cells A1 to G1 identifying Draw# and N1, N2, N3, N4, N5 and N6. Then, starting in row 2, list the draw number and the winning numbers N1 to N6. On Sheet2, have labels such as No 1, No 2 and Times in cells A1 to C1. Run the macro and you will have how often any two pair of numbers have come out.
Option explicit
Sub Pairs()
Dim I As Integer, J As Integer
Dim nDoubl(49, 49) As Integer, nNb(6) As Integer
Application.ScreenUpdating = False
For I = 1 To 49
For J = I + 1 To 49
nDoubl(I, J) = 0
Next J
Next I
Sheets("Sheet1").Select
Range("A2").Select
Do While ActiveCell.Value <> ""
For J = 1 To 6
nNb(J) = ActiveCell.Offset(0, J).Value
Next J
nDoubl(nNb(1), nNb(2)) = nDoubl(nNb(1), nNb(2)) + 1
nDoubl(nNb(1), nNb(3)) = nDoubl(nNb(1), nNb(3)) + 1
nDoubl(nNb(1), nNb(4)) = nDoubl(nNb(1), nNb(4)) + 1
nDoubl(nNb(1), nNb(5)) = nDoubl(nNb(1), nNb(5)) + 1
nDoubl(nNb(1), nNb(6)) = nDoubl(nNb(1), nNb(6)) + 1
nDoubl(nNb(2), nNb(3)) = nDoubl(nNb(2), nNb(3)) + 1
nDoubl(nNb(2), nNb(4)) = nDoubl(nNb(2), nNb(4)) + 1
nDoubl(nNb(2), nNb(5)) = nDoubl(nNb(2), nNb(5)) + 1
nDoubl(nNb(2), nNb(6)) = nDoubl(nNb(2), nNb(6)) + 1
nDoubl(nNb(3), nNb(4)) = nDoubl(nNb(3), nNb(4)) + 1
nDoubl(nNb(3), nNb(5)) = nDoubl(nNb(3), nNb(5)) + 1
nDoubl(nNb(3), nNb(6)) = nDoubl(nNb(3), nNb(6)) + 1
nDoubl(nNb(4), nNb(5)) = nDoubl(nNb(4), nNb(5)) + 1
nDoubl(nNb(4), nNb(6)) = nDoubl(nNb(4), nNb(6)) + 1
nDoubl(nNb(5), nNb(6)) = nDoubl(nNb(5), nNb(6)) + 1
ActiveCell.Offset(1, 0).Select
Loop
Range("A1").Select
Sheets("Sheet2").Select
Range("A1").Select
For I = 1 To 48
For J = I + 1 To 49
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, 0).Value = I
ActiveCell.Offset(0, 1).Value = J
ActiveCell.Offset(0, 2).Value = nDoubl(I, J)
Next J
Next I
Application.ScreenUpdating = True
Range("A2").Select
End Sub
Have fun!