[....]
> v = Range("a2", "d6")
> nv = UBound(v, 1)
> Sheets.Add after:=ActiveSheet
> r = 1
> For i = 1 To nv
> agents = Range(Cells(i, 1), Cells(i,
> 3)).Cells.SpecialCells(xlCellTypeConstants).Count
> For j = 1 To scouts
> r = r + 1
> Cells(r, "a") = v(i, 1)
> Cells(r, "b") = v(i, j + 1)
> Cells(r, "c") = j
> Next j
> Next i
Several mistakes.
The most obvious would have been detected if you had put Option Explicit at
the beginning of the module. I omitted it from my first example. My bad!
The mistake: you reference the undeclared (and uninitialized) variable
"scouts". Presumably you meant "agents".
Your data range is from row 2 through row 6, but
Range(Cells(i,1),Cells(i,3)) references rows 1 through 5. Also, the agents
are in columns 2 through 4, not 1 through 3. So you should use
Range(Cells(i+1,2),Cells(i+1,4)).
Similarly, the for-loop should be For j = 1 To agents-1.
However, that design assumes the columns of agents are contiguous in each
row. Probably a reasonable assumption; and you should know: it's your
design. But I did not know that. So I did not rely on that assumption;
hence the use of n instead of j for the agent's ordinal number.
Finally, a minor nit-pick: the use of .Cells is superfluous. You could
write simply Range(...).SpecialCells(...).Count.