PC Review


Reply
Thread Tools Rate Thread

Copy each data record of a name list and place it under the onecopied

 
 
andreashermle
Guest
Posts: n/a
 
      7th Oct 2009
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
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      7th Oct 2009
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
(E-Mail Removed)
"andreashermle" <(E-Mail Removed)> wrote in message
news:f674d527-229b-48cf-883d-(E-Mail Removed)...
> 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


 
Reply With Quote
 
andreas-hermle
Guest
Posts: n/a
 
      7th Oct 2009
On 7 Okt., 15:47, "Don Guillett" <dguille...@austin.rr.com> 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
> dguille...@austin.rr.com"andreashermle" <andreas.her...@gmx.de> wrote in message
>
> news:f674d527-229b-48cf-883d-(E-Mail Removed)...
>
>
>
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data from one record to a new record on a sub form =?Utf-8?B?RWNob3NwaWNl?= Microsoft Access Forms 4 19th Jul 2011 05:19 PM
Problems copy data when using filter in place Snuffwinkler Microsoft Excel Programming 3 23rd Jul 2010 05:55 PM
button to copy text and place it in new record Slappy Microsoft Access Macros 4 11th May 2008 06:28 PM
Data Validation when a list is already in place =?Utf-8?B?QWxleA==?= Microsoft Excel Worksheet Functions 3 26th Jan 2007 01:54 PM
How do I select data from a pick list and place in current cell? John Day Microsoft Excel Misc 2 20th Sep 2004 04:24 AM


Features
 

Advertising
 

Newsgroups
 


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