+ Reply to Thread
Results 1 to 6 of 6

Problems on Implementing do..until on excel spreadsheet

  1. #1
    Registered User
    Join Date
    02-25-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Question Problems on Implementing do..until on excel spreadsheet

    Hi all! Suppose I have following data :



    133.65
    137.25
    135.78
    132.24
    130.45
    131.99
    135.88
    136.06
    130.23
    136.61
    133.59
    136.54
    132.91
    139.61
    133.19
    132.36
    133.15
    133.59
    135.78
    135.78
    137.27
    137.44
    133.77
    131.96
    135.68
    138.40
    137.53
    134.36
    139.16
    132.70
    excel.jpg

    I wish the excel could tell me what range of value could divide these 30 data into groups with exactly 5 data per group.

    I have an idea on this but I don't know how to command it into VBA language. The logic is here:

    whenever a cell which shows "counts" is not equal to 5, it add 0.1 to the cells in left hand side, which represent a range.

  2. #2
    Registered User
    Join Date
    03-19-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Problems on Implementing do..until on excel spreadsheet

    Sorry, I'm not sure I understand what you mean.
    In worksheet_change, could you not do this?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-25-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Problems on Implementing do..until on excel spreadsheet

    I tried these code but it seems works one time only? it ends when 0.1 is added.

    I found that there should be an easier way. May u help?

    First sort these 30 data in ascending order, then the range is the cell value of 5th,10thcell..
    Last edited by soldout2; 03-19-2013 at 10:38 AM.

  4. #4
    Registered User
    Join Date
    03-19-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Problems on Implementing do..until on excel spreadsheet

    Quote Originally Posted by soldout2 View Post
    Thank you for answering. But sorry where should I put these code? I am new
    In the VB Editor, you should see the sheet your using to hold this data. If you double click on that sheet, you will see two drop downs.
    in the first drop down, select 'Worksheet'. In the second drop down, select 'Change'.

    Paste the code there. I am not sure if this code answers your original question as I'm unsure what you actually need.
    Please use the star icon to rate my answer.

  5. #5
    Registered User
    Join Date
    02-25-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Problems on Implementing do..until on excel spreadsheet

    What I need is like this picture:
    excel2.jpg

    each range of value consists 5 data points

  6. #6
    Registered User
    Join Date
    03-19-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Problems on Implementing do..until on excel spreadsheet

    Its a bit hard to understand what you want without knowing the meaning behind the 5.
    By the looks of that, you just need to enter 5 in each row.

    You can enter 5, and drag the value down to duplicate.
    Without any further information, and the spreadsheet to try and gather a better understanding of what you need.
    I am unable to assist any further.

+ 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