ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Draw Entries (https://www.excelbanter.com/excel-programming/397391-draw-entries.html)

GBH99

Draw Entries
 
(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?


Sebation

Draw Entries
 
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" ...
(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?





All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com