Question:

I am looking for a software that will show me the formula from a pool of numbers and a random numbers list?

by  |  earlier

0 LIKES UnLike

The pool is a 4 digits number that obey this rule: first number is the lowest, the second can be equal or higher than the first one, the third obey the same rule as well as the fourth one. The total numbers of the pool is 714. Exception rule, the 0 digit does not precede and is considered as a high value digit and can only be followed by a number other than itself, 1000 is valid, 6001 is not. As an example, this is a sample of the pool 2880 2888 2889 2890 2899 2900 2990 2999 3300 3330.

The random list follows the same rule but is not in sequential order, can be repeated, here is an example of the list as they came up 3444 1780 6688 1277 3457 2478 1149 3990 1780 1780.

What I need is a software or freeware that allows me to enter the pool and the random list and give me the random formula (as in excel would be great!) that give that list. I am trying to do a reverse engineering project.

 Tags:

   Report

1 ANSWERS


  1. Assume the cell you want the list to start is A1,

    Alt+F11, to go to vb editor, right click on the left side icon, then insert a module to the workbook, click the module, and on the right blank area add the code below

    Sub my4DigitList()

    cell2StartList = "A1" 'cell where 4 digit number start to list

    For a = 1000 To 9999

       If Mid(a, 1, 1) <= Mid(a, 2, 1) And Mid(a, 2, 1) <= Mid(a, 3, 1) And Mid(a, 3, 1) <= Mid(a, 4, 1) Then

          GoSub putNum

       ElseIf Mid(a, 1, 1) <= Mid(a, 2, 1) And Mid(a, 2, 1) <= Mid(a, 3, 1) And Right(a, 1) = 0 Then

          GoSub putNum

       ElseIf Mid(a, 1, 1) <= Mid(a, 2, 1) And Right(a, 2) = 0 Then

          GoSub putNum

       ElseIf Right( a, 3) = 0 Then

          GoSub putNum

       End If

    Next

    Exit Sub

    putNum:

       Range( cell2StartList).Offset( b, 0) = a

       b = b + 1

    Return

    End Sub

    Go back to excel worksheet, Alt+F8, run macro my4DigitList, then you're done

    May be that's the list you wanted, please contact for more info

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.