LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Macro help? The Message Excel Discussion (Misc queries) 2 December 14th 09 05:14 PM
simple macro widman Excel Discussion (Misc queries) 7 June 7th 08 08:57 PM
Need Help With A Very Simple Macro Amca Excel Discussion (Misc queries) 3 May 7th 05 12:10 AM
Help with simple(?) macro Cutter[_2_] Excel Programming 7 July 2nd 04 01:30 AM
SIMPLE MACRO!!! Hugh Millen Excel Programming 5 August 23rd 03 04:27 PM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"