Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Floyd Elkins
 
Posts: n/a
Default insert rows in excel spreadsheet via macro

I need to be able to insert a number into a column in an Excel Spreadsheet
and have that number of rows (copied from another row) entered following that
row.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

With VBA

ActiveCell.Offset(1, 0).Resize(ActiveCell.Value).EntireRow.Insert


--
HTH

Bob Phillips

"Floyd Elkins" <Floyd wrote in message
...
I need to be able to insert a number into a column in an Excel Spreadsheet
and have that number of rows (copied from another row) entered following

that
row.



  #3   Report Post  
Floyd Elkins
 
Posts: n/a
Default

Thanks Bob - I really appreciate the prompt response! I need to be able to
go to a specific column (heading = Quantity). Based on the number entered, I
want to enter that number of rows immediately following this entry. I'm not
sure that a Macro is the right way to do this, and I can't find a command
that will do it. Any suggestions?

Thanks again,

Floyd

"Bob Phillips" wrote:

With VBA

ActiveCell.Offset(1, 0).Resize(ActiveCell.Value).EntireRow.Insert


--
HTH

Bob Phillips

"Floyd Elkins" <Floyd wrote in message
...
I need to be able to insert a number into a column in an Excel Spreadsheet
and have that number of rows (copied from another row) entered following

that
row.




  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

Bob's VBA command does just what you want.

If you are not comfortable with macros/VBA, get a quick tutorial at David
McRitchie's website

http://www.mvps.org/dmcritchie/excel...m#vbatutorials


"Floyd Elkins" wrote:

Thanks Bob - I really appreciate the prompt response! I need to be able to
go to a specific column (heading = Quantity). Based on the number entered, I
want to enter that number of rows immediately following this entry. I'm not
sure that a Macro is the right way to do this, and I can't find a command
that will do it. Any suggestions?

Thanks again,

Floyd

"Bob Phillips" wrote:

With VBA

ActiveCell.Offset(1, 0).Resize(ActiveCell.Value).EntireRow.Insert


--
HTH

Bob Phillips

"Floyd Elkins" <Floyd wrote in message
...
I need to be able to insert a number into a column in an Excel Spreadsheet
and have that number of rows (copied from another row) entered following

that
row.




Reply
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
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
how do I insert a watermark onto an Excel spreadsheet? Anna Excel Discussion (Misc queries) 1 April 5th 05 03:25 PM
can't insert more rows even though not at max rows nikkiamber Excel Worksheet Functions 3 April 4th 05 10:45 PM
Activate a macro to insert a row and copy the formuals from the rows above to the blank row oil_driller Excel Discussion (Misc queries) 1 February 11th 05 03:30 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 10:08 AM.

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

About Us

"It's about Microsoft Excel"