Hi Dave,
> There's only one minor problem.
> The output has each row N+1 times based on the number in the first
> column.
Your original post showed your raw data as:
3 rgf rhh
2 xyz abc
4 ejerr
5 rrrr
You showed the required resuks as:
3 rgf rhh
3 rgf rhh
3 rgf rhh
2 xyz abc
2 xyz abc
4 ejerr
4 ejerr
4 ejerr
4 ejerr
5 rrrr
5 rrrr
5 rrrr
5 rrrr
5 rrrr
Which is what my suggested code produces - indeed the above table is a
direct copy / paste of the data produced by the code.
> Since we have an "original" we only need to copy N-1 times.
This requirement is reflected in the lines:
k = .Value - 1
If k > 0 Then
.EntireRow.Resize(k).Insert
k is the value in column A, k-1 rows are inserted.
If you are stll experiencing a problem, I can send you my test book in
response to an email:
norman_jones@NOSPAMbtconnectDOTcom
(Delete "NOSPAM" and replace "DOT" with a full stop [period] )
---
Regards,
Norman