+ Reply to Thread
Results 1 to 4 of 4

Why the integer stop loop even not reach the number? thanks!

  1. #1
    Registered User
    Join Date
    11-05-2020
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    2

    Unhappy Why the integer stop loop even not reach the number? thanks!

    Please help, I am trying to do until r > cases, the cases is 4000. which I can also confirm it on debug mode.
    but if I run this code, the looping will stop when "r" reach "5". I tried to replace "r > cases" as "r > 9999", it works well.
    just wondering what happens to cases....please help, thanks!


    The code as below:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    361

    Re: Why the integer stop loop even not reach the number? thanks!

    you could just use formulas for this its way faster

    B5 =CONCATENATE("Male: ";COUNTIF(data!C:C;"M"))
    C5 =CONCATENATE("Female: ";COUNTIF(data!C:C;"F"))
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Registered User
    Join Date
    11-05-2020
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Why the integer stop loop even not reach the number? thanks!

    Quote Originally Posted by Joske920 View Post
    you could just use formulas for this its way faster

    B5 =CONCATENATE("Male: ";COUNTIF(data!C:C;"M"))
    C5 =CONCATENATE("Female: ";COUNTIF(data!C:C;"F"))
    could you modify this to VBA code for me? thanks!!

  4. #4
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    361

    Re: Why the integer stop loop even not reach the number? thanks!

    Please Login or Register  to view this content.

+ 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. Count until reach some number and copy that row's information then loop
    By youjizz69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2020, 05:37 AM
  2. [SOLVED] Loop on the Row as integer, getting integer into a range
    By Fean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2018, 07:16 AM
  3. Replies: 7
    Last Post: 05-16-2017, 08:22 AM
  4. Loop Do Until Reach a maximum value
    By n_ant in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2013, 03:23 PM
  5. How to stop updating cells after you reach a certain number
    By dberg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 05:01 PM
  6. Count the number of occurrences of an integer withing a larger integer
    By nnktran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2010, 01:04 PM
  7. reach previous value in a loop
    By 77anders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2009, 02:50 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