98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel VBA
Excel VBA
Resolved · High Priority · Version 2003
Karen has attended:
Excel VBA Intro Intermediate course
Excel VBA
How can I generate the next number in a list of consecutive numbers ?
RE: Excel VBA
Hi Karen
A simple way to generate consecutive numbers is by using a Variable and some form of loop. For example:
Dim Counter as Integer
For Counter = 1 To 500
<Do your thing using the Counter in the code>
Next Counter
Alternatively you could use an accumulator on the Variable
Dim MyNumber as Integer
MyNumber = 1
MyNumber = MyNumber +1
This line of code would be placed in the sequence where the next consecutive number was required
Hope this helps
Carlos
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Moving or Copying Sheets Between Workbooks in Excel 2010Here's how to move or copy sheets between workbooks in Excel 2010: |