try:
Sub test()
dim i as integer
dim j as integer
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Range("d:d").ClearContents
For i = 1 To lastrow
For j = 1 To Cells(i, 2)
lrow = Range("d65536").End(xlUp).Row
Cells(lrow, 4).Offset(1, 0) = Cells(i, 1)
Next j
Next i
End Sub
HTH
Regards
Sebation.G
"GBH99" <(E-Mail Removed)> 写入消息新闻:5898B81E-0993-4B31-9A74-(E-Mail Removed)...
> (not sure if last request went through so apologies if it did)
>
> I have a name in Column A, say the data starts in A23, then in Column I i
> will be producing a the number of draw entries this person would acquire,
> I
> then need to paste the Name onto a Draw spreadsheet. Also I need to number
> the entries
>
> EG
> Name no. of draws
> Gareth Havard 3
> Anon 1
>
> To number my name on the draw sheet in columns
> a b
> 1 Gareth Havard
> 2 Gareth Havard
> 3 Gareth Havard
> 4 Anon
>
> And so on and so on until there are no more names, some will have zeros
> and
> should not be pasted. Is this possible?
>
|