Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Inserting Multiple Rows into Spreadsheet

I have several spreadsheets of 14,000-15,000 lines each that need rows added
at intervals determined by an ID code in column A. The number of rows of
data varies from 7 to 24. The macros I've seen posted deal with a more fixed
interval. Can this be modified to essentially add rows at random, or is
there another possibility?

Thanks for any Info
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Inserting Multiple Rows into Spreadsheet

Rows can be added with a macro by looking at data on the worksheet to
determine where rows ae added.

Sub AddRows()

IDNum = 123
LastRow = Range("A" & Rows.Count).end(xlup).Row
for RowCount = LastRow to 1 step -1
if Range("A" & RowCount) = IDNum then
Rows(RowCount + 1).Insert
end if
next RowCount

End Sub

"Auburn Jon" wrote:

I have several spreadsheets of 14,000-15,000 lines each that need rows added
at intervals determined by an ID code in column A. The number of rows of
data varies from 7 to 24. The macros I've seen posted deal with a more fixed
interval. Can this be modified to essentially add rows at random, or is
there another possibility?

Thanks for any Info

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
Inserting Multiple rows Larry in Seattle Excel Discussion (Misc queries) 2 August 28th 07 08:48 PM
inserting rows on multiple worksheets Sarah Excel Worksheet Functions 0 August 17th 07 02:12 AM
Inserting multiple rows every other row Scottm Excel Discussion (Misc queries) 1 February 14th 07 08:19 PM
Inserting Multiple Rows Mike Excel Discussion (Misc queries) 4 February 9th 06 01:21 AM
Inserting multiple rows syssupspe Excel Discussion (Misc queries) 3 January 13th 06 05:06 PM


All times are GMT +1. The time now is 02:33 PM.

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"