+ Reply to Thread
Results 1 to 8 of 8

Pattern/Sequence of Numbers based on Ratio/Percentage

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Modesto, CA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Pattern/Sequence of Numbers based on Ratio/Percentage

    Ciao All ~

    Is it possible to generate / create a sequence of binary numbers, that cannot repeat more than twice, based on an entered ratio x:y? if not a ratio, than perhaps two percentages equal to 100%?

    For example, a 2:1 ratio would generate a 12 cell pattern of : 1,1,0,1,1,0,1,1,0,1,1,0

    Cheers in advance.

    artikyulashun

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,701

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    More examples?
    How about 3:2 ratio , 1:3?

    Please explain, how you calculated that for presented result:
    1,1,0,1,1,0,1,1,0,1,1,0
    two percentages equal to 100%?
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    11-10-2017
    Location
    INDIA
    MS-Off Ver
    365
    Posts
    184

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    Quote Originally Posted by artikyulashun View Post
    Ciao All ~

    Is it possible to generate / create a sequence of binary numbers, that cannot repeat more than twice, based on an entered ratio x:y? if not a ratio, than perhaps two percentages equal to 100%?

    For example, a 2:1 ratio would generate a 12 cell pattern of : 1,1,0,1,1,0,1,1,0,1,1,0

    Cheers in advance.

    artikyulashun
    Hi,
    The binary code patter is fixed of 12 digits??? If yes the your second condition to get atmost 2 consecutive digits is not possible.
    Need to have better understanding about what you are upto.....

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,701

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    Hi Sunny18pc,

    Please don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below.

    See rule 12 of https://www.excelforum.com/forum-rul...rum-rules.html

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    To convert a decimal to binary use (in A10)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where E5:G5 is the ratio
    To verify that the converted decimal number allows you to form the default use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file that also contains another solution for generating random patterns.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-21-2012
    Location
    Modesto, CA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    I'm trying to create a rotating weekly promotional calendar based on MFGs share of unit volume for a particular item. I was starting with the first 12 weeks, but it could just as easily be 52.

    My initial thought was simply trying to create an "on/off" [ binary 1's and 0's ] pattern based on their ratio of unit volume.

    Say you have 3 Manufacturers selling Bananas. MFG A has sold 60% of the unit volume over the past 52 weeks. MFG B 25% and MFG C 15%.

    Based on their historical unit volume, MFG A could have Bananas on sale roughly 7 weeks, while MFG B 3 and MFG C 2.

    Is it possible to create a formula that would generate an on/off pattern for these three companies? The hope is not to allow any one company to be on sale for more than two weeks.

    Hope this clarifies.

  7. #7
    Registered User
    Join Date
    08-21-2012
    Location
    Modesto, CA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    Thank you Jose Augusto. Like what you've produced. I'll spend some time this morning trying to wrap my head around it and see if I can apply it to my problem.

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,701

    Re: Pattern/Sequence of Numbers based on Ratio/Percentage

    Try this:
    in A1 and B1 your ratio, so for 2:1 2 in A1 and 1 in B1, for 60% 6 and 4 (or 3 and 2), and so on.
    in A2 formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in B2 (and copy to right as far an many elements you need):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    so for instance with 7:4 your pattern will repeat every 11 cells as:
    1 0 1 1 0 1 0 1 1 0 1

    In attached file I used conditional formatting with alternating colors to show where pattern repeats.
    and to clarify, in your first sample I'd say that pattern is just 1,1,0 (or -as generated with above formulas: 1,0,1) and for 12 elements it's simply repeated 4 times :-)
    Attached Images Attached Images
    Attached Files Attached Files

+ 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] Ratio/Percentage of column
    By jthomas6528 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-19-2017, 05:22 PM
  2. creating a custom pattern/sequence based on input freq./duration and priority
    By akamenov88 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-30-2015, 05:00 PM
  3. How to calculate a number based on the given ratio. For example a 2:3 ratio.
    By Ayoub99k in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-11-2015, 08:15 AM
  4. Sequence Numbers based on a Value
    By lisa6538 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2013, 05:41 PM
  5. [SOLVED] Creating a sequence based on numbers in one column and adding "01,02..." to a new sequence
    By JCR1968 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2013, 08:06 AM
  6. Convert Ratio Value to Percentage Value
    By harishs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2011, 10:06 AM
  7. determine ratio or percentage?
    By pinchrx in forum Excel General
    Replies: 2
    Last Post: 12-27-2010, 12:57 PM

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