Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.de.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.general
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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   Report Post  
Posted to microsoft.public.de.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.general
external usenet poster
 
Posts: 70
Default 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
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 lines throughout a spreadsheet Kerry Excel Worksheet Functions 3 October 18th 06 11:07 PM
Inserting # of lines from one spreadsheet to another klafert Excel Discussion (Misc queries) 1 August 30th 06 01:18 PM
Inserting Lines or Copying lines with formulas but without data wnfisba Excel Discussion (Misc queries) 2 August 18th 06 04:41 PM
Inserting Lines And Copying Them Troyk Excel Programming 1 May 27th 04 03:19 PM
Inserting Lines C[_2_] Excel Programming 3 October 3rd 03 10:44 PM


All times are GMT +1. The time now is 05:39 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"