+ Reply to Thread
Results 1 to 3 of 3

Incrementing with Do while Loop

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    41

    Incrementing with Do while Loop

    For example...

    I have a combobox called combobox1
    In the combobox, I have populated it with different type of coffees: Cappucino, Latte, Mochachinno, and Flat White.

    I am going to start incrementing by 1 as the coffee no. If the coffee remains unchanged, the increment will remain at the current number (ie. 1), but if the coffee type changes, then the coffee will increment by 1. How do I do this within a Do while loop?

    Cheers
    Dinosaur1993

  2. #2
    Registered User
    Join Date
    10-15-2013
    Location
    Eaton Rapids, Michigan
    MS-Off Ver
    2003, 2007, 2010
    Posts
    8

    Re: Incrementing with Do while Loop

    Hi, dinosaur1993. Do you want a straight increment, or are you looking to assign each coffee type a number? For example, if I start at 1 (Cappuchino), then go to Latte(2), then Mochachino(3), then back to Cappuchino (4), then another Latte(5)? Or do you want more of an "If x = Cappuchino y = 1, If x = Flat White y = 4" scenario?

  3. #3
    Registered User
    Join Date
    09-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Incrementing with Do while Loop

    Hey JLogram3o13,

    Sorry for making it quite vague...

    I would like it to be:
    if I start at 1 (Cappuchino), then go to Latte(2), then Mochachino(3), then back to Cappuchino (4), then another Latte(5)?

    Thank you!

+ 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. Incrementing two 'For Each-Next loop' at the same time
    By shrimic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-06-2012, 08:09 PM
  2. Incrementing variables in a Loop
    By sungsam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2011, 11:32 AM
  3. For Next Loop incrementing question
    By panthers7171 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2009, 11:44 PM
  4. [SOLVED] Incrementing Do/Loop, For/Next and For/Each
    By Steve Drenker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2006, 03:00 PM
  5. [SOLVED] incrementing columns in a loop
    By Mitch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2005, 11:05 AM

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