View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Need help with simple macro

garlnnd,

I wouldn't say "nailed it" since it blows up when the value in column A is 1 or is non-numeric.

Try my second version, which looks at both.

HTH,
Bernie
MS Excel MVP


"garlnnd" wrote in message
...

Someone from another board nailed it with this:

Dim I As Long
Dim X As Long
Dim rng As Range

I = 2
Set rng = Range("A" & I)
While rng.Value < ""

X = rng.Value
rng.EntireRow.Copy

rng.Offset(1, 0).Resize(X - 1, 1).Insert Shift:=xlDown
I = I + X
Set rng = Range("A" & I)
Wend
Application.CutCopyMode = False

Thanks for your help.


--
garlnnd
------------------------------------------------------------------------
garlnnd's Profile: http://www.excelforum.com/member.php...o&userid=27832
View this thread: http://www.excelforum.com/showthread...hreadid=473426