+ Reply to Thread
Results 1 to 5 of 5

Code for Creating A Row of Random Group

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    33

    Code for Creating A Row of Random Group

    Hello guys,

    I need a code that, a row of 191 cells, each cells randomly be white or black. The 192nd cell to 382 be a neighborhood number of each of 191 cells respectively and it's also random.

    How can I do such a code?
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Code for Creating A Row of Random Group

    Try this ...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-10-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    33

    Re: Code for Creating A Row of Random Group

    Wow great. Many thanks. How can i assign neighboorhood number for this cells. I mean lets take the first cell. Randomly i wanna assign it from 1 to 5.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Code for Creating A Row of Random Group

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-10-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    33

    Re: Code for Creating A Row of Random Group

    You are like savior O.o. Last thing is iteration. After this two is combined.

    For the first cell has 3 neighboors after the neighboorhood assign. First cell look right and left 3 neighborhood -for example3 left 3 and right 3. Counting the Black ones and then if the Black> whites, after iteration the first row must be black.

    After it, neighborhood number is also change in iteration. For this there is also a calculation

    For 3 neighbor numbers - calculate the number of black
    For 4 calculate the black then if f(4)>f(3) take 4 as new neighborhood number else look for 2 neighbor numbers

    f(2)=f(3) then take 2 as new else 3 is stay

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Creating a random group selecter (with criteria)
    By ScottishAngel in forum Excel General
    Replies: 3
    Last Post: 10-02-2016, 07:17 PM
  2. random number for group
    By mohdmizi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-19-2014, 06:52 AM
  3. [SOLVED] creating and re-creating 'random' numbers from a specific seed that can be recreated
    By OberonViking in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-15-2014, 04:13 PM
  4. Creating sinle random letter - code not working
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-27-2012, 09:38 AM
  5. Random sentence maker from group of words
    By xXNetRavenXx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2010, 09:42 AM
  6. Random selection of cell information from a group of cells
    By Icecycle66 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-23-2009, 11:18 AM
  7. Creating a random scheduler.
    By timjm in forum Excel General
    Replies: 2
    Last Post: 08-14-2006, 03:40 AM

Tags for this Thread

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