+ Reply to Thread
Results 1 to 3 of 3

How to generate series of horizontal numbers?

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    How to generate series of horizontal numbers?

    Well it's a little bit hard to explain but it's pretty simple;

    One of my cells on Excell is going to take a random number.
    I need to generate series of separated "1"s horizontally with the exact amount of that random number.
    For example if the random number is "4" I need it to generate on four cells "1 1 1 1".
    Or if it's "2" generate on two cells "1 1". If it's 3 then "1 1 1" and so on. That random number is gonna change many times.

    Additional Information.
    -I don't know if it helps but I need separated "1"s because I need to multiply each one by other different random numbers.
    -(I know how to do this, my question is just the one above, it's just informative) My random number obviously just gonna take integer numbers and the limit is nine, actually it can take any value from 1 to 9 except 3.

    I hope it's possible to do, and to have been clear with the question (English is not my first language).

    Thank you so much :).
    Last edited by eduardo081092; 03-26-2013 at 06:31 PM.

  2. #2
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to generate series of horizontal numbers?

    a1= random number b1 across to j1 =if(columns($a$1:a1)>$a$1,"",1)
    if you want nothing for 3
    =IF(OR(COLUMNS($A$1:A1)>$A$1,$A$1=3),"",1)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How to generate series of horizontal numbers?

    Quote Originally Posted by martindwilson View Post
    a1= random number b1 across to j1 =if(columns($a$1:a1)>$a$1,"",1)
    if you want nothing for 3
    =IF(OR(COLUMNS($A$1:A1)>$A$1,$A$1=3),"",1)
    Thank you so much it worked perfectly! It doesn't look simple at all, I couldn't have come up with that by myself, thanks again :D!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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