+ Reply to Thread
Results 1 to 16 of 16

Odd even equal to Array

  1. #1
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Odd even equal to Array

    Plse delete
    Attached Files Attached Files
    Last edited by ricklou; 09-25-2012 at 02:03 PM.

  2. #2
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Odd even equal to Array

    Can you expand on what you want to list; what do you mean "list all even odds"?

    Is your first item in Sheet2 in error? It does not add up to 57.

    Array from Sheet2 cell F2:
    0, 11, 18, 4, 2, 22

    When mapped to the numbers in column B, the values in column A are:
    1 + 2 + 4 + 6 + 11 + 39 = 63

  3. #3
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Plse delete
    Last edited by ricklou; 09-25-2012 at 02:03 PM. Reason: wrong data

  4. #4
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Odd even equal to Array

    I see...I was mapping the six numbers when they should have been added together to equal 57.

    As I understand the problem, you want your list, with each cell in column F having an array
    of 6 numbers separated by commas, to be unique and not be used again with some other arrangement.

    Try out the macro in the attached Excel file. It gives 4 columns of information beyond column F
    in your Sheet2 sample.

    It adds in separate columns:
    - the array sorted in ascending order for purposes of easier reviewing for duplicates
    - the odd counts (0 and odd numbers in the array are counted)
    - even counts (counts even numbers in the array)
    - row number of the original item if combination has already been used

    This is an after-thought to your application. Preventing duplication would normally be taken care of
    in the code that creates the list in column F.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Plse delete
    Last edited by ricklou; 09-25-2012 at 02:03 PM.

  6. #6
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Odd even equal to Array

    What are the rules for duplicating elements in the array? Is 2,2,2,2,23,25 (which has 4 evens and 2 odds, and equals 58) a valid combination?

  7. #7
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Quote Originally Posted by xLJer View Post
    What are the rules for duplicating elements in the array? Is 2,2,2,2,23,25 (which has 4 evens and 2 odds, and equals 58) a valid combination?
    Duplications are allowed as far as I know xLJer. Have a look at the macro Module 1.....sheet1. If array(Column F)=total and total =total odds of Column A then write array results in column H -and if not equaled to # even odds -then do not write.Can this be done?

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Odd even equal to Array

    ricklou,

    When it comes right down to it, a macro is just a series of steps to get executed. Can you explain in detail the step-by-step process that should be followed if someone were doing this by hand?
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Plse delete
    Last edited by ricklou; 09-25-2012 at 02:04 PM.

  10. #10
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Odd even equal to Array

    ricklou,

    It should be doable, if you can define what you want done, though I feel I should tell you that predicting lotto numbers is not actually possible.

    In your previous post, you still use vague descriptions. What is the step-by-step process someone doing this by hand would follow to get the desired results?

    For example:
    1) Run sum to target macro
    2) That produces the array of results in column F
    3) Take the first result and see if the following applies: (something to do with odds/evens in column A? still not clear)
    3a) ???
    3b) ???
    3c) ???
    4) If conditions in step 3 are met, add the item to a new, more filtered list that will be displayed in column H, otherwise it didn't meet the conditions and that particular result in column F can be skipped.
    5) Repeat until all F cell results have been processed
    6) Output new results to column H.

  11. #11
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Odd even equal to Array

    In response to your comment "duplicates are allowed" (in the array), this gives you more possibilities, and you are trying to have fewer.

    This looked interesting to solve, but with this new knowledge and knowing it's purpose is to make us all rich the easy way, I'm bowing out now
    because of the false hopes an Excel macro might raise for hitting the lotto jackpot.

  12. #12
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Plse delete
    Last edited by ricklou; 09-25-2012 at 02:39 PM.

  13. #13
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Odd even equal to Array

    ricklou,

    I hate to be the bad guy, but trying to predict lotto numbers is a waste of time for all parties involved. It is one of the few times in life that previous history doesn't help at all, because it is always randomly determined with no pattern.

    You are welcome to embark on this endeavor, but I will not. I apologize if my coding gave you false hope.

  14. #14
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    xLjer

    Quite correct its gonna give you more BUT if you can run a E/O on numbers and and even odd on skips it should hopefully give you less arrays than 2500.......I dont put my hope on this Macro as I know like Tigeravatar said its still a very long shot.BUT I can assure you the concept MIGHT be spot on. Thanks for your help xLJer -appreciate your contribution. This forum is all for learning........just wished I was more clued up in helping myself.....I am very far from a programmer but always nice to see where you put your will there is a way

    Ricklou

  15. #15
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Tigeravata I never said it will be a confirmed way of winning, its long shot only stand a chance if the conditions are met and lady luck has smile on u. Its random but I beg to differ patterns do occasionally appear......it cannot be draw after draw but it can happen. I have seen it with ours.......not your US based ones as I dont have your data. Thanks for your help though

  16. #16
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Odd even equal to Array

    Can any admin please delete this whole thread.......Thank you as its irrelevant and impossible so please delete!
    Last edited by ricklou; 09-25-2012 at 03:06 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1