The following macro (originally written by GillesD) does the job. It just goes through all combinations until it reaches the lex value that is entered in cell A1. It then places the numbers N1 to N6 in cells B1 to G1.
Listing for the macro LexToNumbers:
Sub LexToNumbers()
nVal = Range("A1").Value
nLex = 0
For A = 1 To 44
For B = A + 1 To 45
For C = B + 1 To 46
For D = C + 1 To 47
For E = D + 1 To 48
For F = E + 1 To 49
nLex = nLex + 1
If nLex = nVal Then
Range("B1").Value = A
Range("C1").Value = B
Range("D1").Value = C
Range("E1").Value = D
Range("F1").Value = E
Range("G1").Value = F
Exit Sub
End If
Next F
Next E
Next D
Next C
Next B
Next A
End Sub
There is also a discussion of a more complicated method of using formulas in this thread, its for 5/56 but the concept is the same.
http://www.lotto649.ws/questions-answers/12452-combination-lexicographix-number.html