View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Albert Jameson Albert Jameson is offline
external usenet poster
 
Posts: 4
Default 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