Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.de.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.general
|
|||
|
|||
Inserting a row after every seven lines
Hello:
I have an Excel problem I would really appreciate help with. I have a very long mailing list for a research project. The list contains rows of names & addresses. I need to divide the list into blocks or parcels of seven names (lines) each. How do I get Excel to insert a row after every seventh line? If I tried to do this manually it could take hours! Thanks a bunch for your help... -Charles |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting a row after every seven lines
Charles,
the following macro should do what you want, although I haven't actually tested it. Post back if you can't get it to work. Sub InsertLines() Dim X as Integer Dim LastRow as Integer LastRow = Range("A65536").end(xlUp).Row LastRow = LastRow + (LastRow Mod 7) For X = LastRow to 7 Step -7 Rows(x).insert Next X End Sub 'Cheers, Pete. -----Original Message----- Hello: I have an Excel problem I would really appreciate help with. I have a very long mailing list for a research project. The list contains rows of names & addresses. I need to divide the list into blocks or parcels of seven names (lines) each. How do I get Excel to insert a row after every seventh line? If I tried to do this manually it could take hours! Thanks a bunch for your help... -Charles . |
#3
Posted to microsoft.public.de.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.general
|
|||
|
|||
Inserting a row after every seven lines
Grüezi Charles
You are in the German-NG; you know that? Charles Shahar schrieb am 04.06.2004 I have an Excel problem I would really appreciate help with. I have a very long mailing list for a research project. The list contains rows of names & addresses. I need to divide the list into blocks or parcels of seven names (lines) each. How do I get Excel to insert a row after every seventh line? If I tried to do this manually it could take hours! Thanks a bunch for your help... Manually it takes about 1 minute when you do it like this: In an temporary column right beside your datas write in the first cell '1' and in the one right below '2', select both and doubleklick the autofill-handle (little black square in the bottom right corner of the selection). Now move to the end of your temporary colunm, write right below the last numer '7' and below that '14', select both of this new cells, 'grab' the autofill-handle with the left mousebutton and move downwards until the shown number is higher than the amount of your datas. Now move back to the top, select *one* cell in your temporary column and click the 'A-Z'-button. Your empty rows are added now - delete the temporary column. -- Mit freundlichen Grüssen Thomas Ramel - MVP für Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inserting lines throughout a spreadsheet | Excel Worksheet Functions | |||
Inserting # of lines from one spreadsheet to another | Excel Discussion (Misc queries) | |||
Inserting Lines or Copying lines with formulas but without data | Excel Discussion (Misc queries) | |||
Inserting Lines And Copying Them | Excel Programming | |||
Inserting Lines | Excel Programming |