LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default separate data with extra column

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.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding digits in a column based on data in a separate column adriver Excel Discussion (Misc queries) 4 April 21st 10 12:41 AM
How to extract data from one column into two separate columns australand Excel Worksheet Functions 5 September 11th 09 02:19 PM
Separate data in a column into new columns Mitchell_Collen via OfficeKB.com Excel Discussion (Misc queries) 1 April 11th 08 02:59 PM
separate data in a column in excel Larry Excel Worksheet Functions 1 May 18th 05 07:19 PM
separate data in a column in excel Peo Sjoblom Excel Worksheet Functions 0 May 18th 05 05:51 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"