Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using for next with two counters
Hi All,
Im trying to use a for next statement with two counters. What i have so far: DDRowCount and DateCount1 are variables defined earlier. say DDRowCount = 4 and DateCount1 = 5 DataRange is a variable too, of the rows of data. For n = 1 To DRRowCount For d = 1 To DateCount1 + 5 DataRange.Cells(n, d).Value = "test" Next d Next n This doesn't seem to be working. Can i please ask for some help on this. Cheers. Alby |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using for next with two counters
Albert,
Always use Option Explicit as the top of your modules. Doing that would quickly point out that... DDRowCount is not the same as DRRowCount It works for me after making the correction. Regards, Jim Cone San Francisco, CA "Albert Jameson" wrote in message ... Hi All, Im trying to use a for next statement with two counters. What i have so far: DDRowCount and DateCount1 are variables defined earlier. say DDRowCount = 4 and DateCount1 = 5 DataRange is a variable too, of the rows of data. For n = 1 To DRRowCount For d = 1 To DateCount1 + 5 DataRange.Cells(n, d).Value = "test" Next d Next n This doesn't seem to be working. Can i please ask for some help on this. Cheers. Alby |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with Counters | Excel Discussion (Misc queries) | |||
Date Counters | Excel Worksheet Functions | |||
Counters | Excel Worksheet Functions | |||
Counters | Excel Programming | |||
counters | Excel Programming |