+ Reply to Thread
Results 1 to 6 of 6

Output something more than once

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    27

    Output something more than once

    I wrote the following code to display cards. There are 52 cards as we know, with the value 1 - 13. I want to output card 1 four times, card 2 four times. Until all 52 are displayed. I tried everything and can get cards 1 through 13 displayed only once.

    Please Login or Register  to view this content.
    Last edited by xlsnovice; 10-27-2010 at 11:01 AM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Output something more than once

    All you need is
    Please Login or Register  to view this content.
    You don't need Card() and you cannot use a reserved word (loop) as a variable. You use loop_x, or something similar.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    10-26-2010
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Output something more than once

    Quote Originally Posted by Palmetto View Post
    All you need is

    You don't need Card() and you cannot use a reserved word (loop) as a variable. You use loop_x, or something similar.
    Thank you. How can I make it display the following way?

    Currently:
    1
    2
    3
    .
    .
    .
    52

    Want:
    1
    1
    1
    1
    2
    2
    2
    2
    .
    .
    .
    52
    52
    52
    52

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Output something more than once

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-26-2010
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Output something more than once

    Quote Originally Posted by Palmetto View Post
    Code
    Wow, worked perfectly. What would I changed if I just wanted 1 - 13 shown repeatedly? Sorry for asking all these questions, but just trying to practice different ways to compare codes to learn from.

  6. #6
    Registered User
    Join Date
    10-26-2010
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Output something more than once

    Quote Originally Posted by xlsnovice View Post
    Wow, worked perfectly. What would I changed if I just wanted 1 - 13 shown repeatedly? Sorry for asking all these questions, but just trying to practice different ways to compare codes to learn from.
    Never mind, figured it out. Thanks again!

+ 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