Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Copy each data record of a name list and place it under the onecopied

Dear Experts:

I got a name list on a worksheet with the following columns

SURNAME NAME CITY
Smith John New York City
Wilber Joe Denver
Garden Thomas San Diego


This list has for example twenty rows / data records. For certain
reasons the following action should be excecuted automatically (using
VBA) on my list regardless of the number of rows:

Duplicate each row and place it directly under the one copied. The
result would then look like this:

SURNAME NAME CITY
Smith John New York City
Smith John New York City
Wilber Joe Denver
Wilber Joe Denver
Garden Thomas San Diego
Garden Thomas San Diego

Help is much appreciated.

Thank you very much in advance. Regards, Andreas
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Copy each data record of a name list and place it under the onecopied

On 7 Okt., 15:47, "Don Guillett" wrote:
Sub copyeachrow()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
Rows(i).Copy
Rows(i + 1).Insert
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"andreashermle" wrote in message

...



Dear Experts:


I got a name list on a worksheet with the following columns


SURNAME * NAME * *CITY
Smith * * * * * John * * * New York City
Wilber * * * * *Joe * * * * Denver
Garden * * * * Thomas * San Diego


This list has for example twenty rows / data records. For certain
reasons the following action should be excecuted automatically (using
VBA) *on my list regardless of the number of rows:


Duplicate each row and place it directly under the one copied. The
result would then look like this:


SURNAME * NAME * * *CITY
Smith * * * * * John * * * * New York City
Smith * * * * * John * * * * New York City
Wilber * * * * *Joe * * * * * Denver
Wilber * * * * *Joe * * * * * Denver
Garden * * * * Thomas * *San Diego
Garden * * * * Thomas * *San Diego


Help is much appreciated.


Thank you very much in advance. Regards, Andreas- Zitierten Text ausblenden -


- Zitierten Text anzeigen -


Great, it is working. Thank you very much for your professional help.
Regards, Andreas
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
Data Validation when a list is already in place ALEX Excel Worksheet Functions 3 January 26th 07 01:54 PM
extract data from a random list & place in another ordered list sean8690 Excel Discussion (Misc queries) 1 January 2nd 07 06:06 PM
Retrieve multiple data rows data from a very long list and copy t mathew Excel Discussion (Misc queries) 1 September 13th 06 08:24 PM
copy formulas from a contiguous range to a safe place and copy them back later Lucas Budlong Excel Programming 2 February 22nd 06 08:26 PM
Need help autopopulating next new record with previous record data Harry S[_3_] Excel Programming 2 October 1st 03 10:59 PM


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