+ Reply to Thread
Results 1 to 3 of 3

Loop till zero

  1. #1
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Loop till zero

    Hi,

    As shown below I want to create a dynamic range in excel vba till split 50 to 9 segments.
    It should stop when the left count becomes 0.

    No. of Segments 9
    no of flowers 50

    No. of Segments Flowers in each segment Left
    9 5 45
    8 5 40
    7 5 35
    6 5 30
    5 6 24
    4 6 18
    3 6 12
    2 6 6
    1 6 0
    0 #DIV/0! #DIV/0!

    Please suggest
    calculate.xlsx
    Shan

  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,632

    Re: Loop till zero

    For me it is not clear what you want to achieve, and why you posted in http://www.excelforum.com/excel-programming-vba-macros/

    1) do you want 9 or 10 (9...0 has 10 members) segments?

    2) as we are in VBA subforum try
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Loop till zero

    Hi Kaper,

    You understood it very well and the solution worked like a charm. I just changed Round(people / i) to Int(people / i).

    Many thanks

+ 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. Loop equation till reach needed meaning
    By timas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2015, 04:57 AM
  2. Repeating loop till no values remain
    By smilton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2014, 01:25 PM
  3. Loop till last row
    By reincarnation.x in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2013, 08:02 AM
  4. [SOLVED] Loop till end of the sheet and loop back to first column again
    By smlim7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2012, 10:03 AM
  5. [SOLVED] How to loop till last row with data?
    By btmtdk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2012, 10:37 AM
  6. Copy Paste and Loop till last column with data
    By eirumba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2011, 07:23 AM
  7. SUMIF and LOOP till the last row
    By georgeanaprop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2010, 02:26 AM

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