+ Reply to Thread
Results 1 to 3 of 3

Incrementing Cells based on a value

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    2

    Incrementing Cells based on a value

    The question proposed is...

    You have 3333 lockers and 3333 kids
    All the lockers start closed.
    Kid 1 opens every locker
    Kid 2 changes ever 2nd locker starting with the 2nd
    kid 3 changes every 3rd locker starting with the 3rd
    so on and so forth until all the kids have been through the lockers.

    Question is how many lockers will be left open?

    I am trying to do this in excel solely for the experiance of it and this is what I have so far...

    I am just trying to write a value of 1 or currentcell +1 if the kid touches the lock then I can use odd and even to tell if the locker is open or closed.

    Please Login or Register  to view this content.
    I could just be completely out of track with this as this is my first time using VB and VB in excel.

    Where I have
    Please Login or Register  to view this content.
    I was just trying to use column A row lockers what ever the current locker number may be.
    Last edited by That1Dude; 04-22-2010 at 03:29 AM. Reason: Clarifying & Meeting Posting guidelines

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trying to figure out this silly problem

    Hi Dude... Welcome to the forum.

    Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to EDIT that post above and put code tags around that code you used. (Like shown in my signature)

    Also, your title is a second rule breach, change your title to one that accurately summarizes the topic. Read your post again, I'm sure a more accurate title will occur to you.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-22-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Trying to figure out this silly problem

    Quote Originally Posted by JBeaucaire View Post
    Hi Dude... Welcome to the forum.

    Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to EDIT that post above and put code tags around that code you used. (Like shown in my signature)

    Also, your title is a second rule breach, change your title to one that accurately summarizes the topic. Read your post again, I'm sure a more accurate title will occur to you.
    Thanks for the advice on fixing up my thread, hope this better meets the necesary criteria.

+ 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