Hi,
I need your help for this problem:
my data looks like this:
xxx 3
yyy 2
zzz 1
...
and I need it like this :
xxx
xxx
xxx
yyy
yyy
zzz
...
Thank you for your help
Hi,
I need your help for this problem:
my data looks like this:
xxx 3
yyy 2
zzz 1
...
and I need it like this :
xxx
xxx
xxx
yyy
yyy
zzz
...
Thank you for your help
Last edited by nicer2011; 12-12-2011 at 04:35 PM.
Try this, it assumes the data starts in A1.
![]()
Sub ExpandData() Dim rng As Range Dim NoRows As Long Set rng = Range("A1") While rng.Value <> "" NoRows = rng.Offset(, 1).Value If NoRows > 1 Then rng.Offset(1).Resize(NoRows - 1).EntireRow.Insert rng.Resize(NoRows).Value = rng.Value End If Set rng = rng.Offset(NoRows) Wend End Sub
Thank you Norie for your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks