separate data with extra column

S

smandula

I am trying to line up data from Sheet 2 to Sheet 1.
In sheet2 data start on row 2 with date col A, number col B, number
col C, number col D
06/18/2008 1 5 3

This is data for Pick Three Lottery. The following VBA works if Sheet
1 has
date - col1 and continuous columns 2 to 10

Sub Newer2() 'Final Code
Dim rCell As Range
Dim rCell2 As Range

For Each rCell2 In Sheet2.Range("A2:A15")
With Sheet1.Range(rCell2.Offset(0, 0).Address)
.Value = rCell2.Value
For Each rCell In rCell2.Offset(0, 1).Resize(1, 3)
.Offset(0, rCell.Value).Value = rCell.Value
Next rCell
End With
Next rCell2

End Sub

However, the above works if there are no double numbers 522 or 242,
or triple numbers 222. To compensate for this I have added an extra
column
beside each of the original columns. So that it looks like:

date col 1 * col 2 * col 3 * col 4 * col 5 * col 6 * col 7 * col 8 *
col 9 * col 10 *

the extra column * hold the overflow 2 of 522 for example
this way I can calculate the frequency of single double triple
numbers,
by suming col + * as a total.

Unfortunately, 0 is 10; as columns start at 1, something you have to
live with.

Any suggestions would be appreciated. Picking three numbers based on
frequency
does sometimes work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top