Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copy and paste a name list across worksheets

I have an excel worksheet which is a name list of some 50 names. I also have
a workbook which is a collection of some 50 worksheets. Now I want to insert
these names, one by one, into cell A1 of each of the 50 worksheets. Is there
a way to do so in one go, instead of having to copy and paste each name, one
at a time, into cell A1 of each worksheet. Thanks


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Copy and paste a name list across worksheets

This little macro will do that for you. I assumed that the sheet that holds
the list of names is named "Names". Change this as you wish. I also
assumed that the names are in Column A and start in A2. HTH Otto
Sub PlaceNames()
Dim rColA As Range
Dim i As Range
Dim c As Long
c = 1
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In rColA
If Worksheets(c).Name = "Names" Then c = c + 1
Worksheets(c).Range("A1").Value = i.Value
c = c + 1
Next i
End Sub
"chungacs" wrote in message
...
I have an excel worksheet which is a name list of some 50 names. I also
have a workbook which is a collection of some 50 worksheets. Now I want to
insert these names, one by one, into cell A1 of each of the 50 worksheets.
Is there a way to do so in one go, instead of having to copy and paste each
name, one at a time, into cell A1 of each worksheet. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copy and paste a name list across worksheets


"Otto Moehrbach" wrote in message
...
This little macro will do that for you. I assumed that the sheet that
holds the list of names is named "Names". Change this as you wish. I
also assumed that the names are in Column A and start in A2. HTH Otto
Sub PlaceNames()
Dim rColA As Range
Dim i As Range
Dim c As Long
c = 1
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In rColA
If Worksheets(c).Name = "Names" Then c = c + 1
Worksheets(c).Range("A1").Value = i.Value
c = c + 1
Next i
End Sub
"chungacs" wrote in message


Thanks a lot

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
Copy range from one worksheet and paste to multiple worksheets mooring Excel Discussion (Misc queries) 10 January 19th 08 04:19 PM
how do i copy n paste one cell to another in different worksheets ucastores Excel Worksheet Functions 1 October 3rd 06 01:49 PM
Copy and Paste between 2 worksheets with VBA Dave Y Excel Worksheet Functions 2 June 15th 05 03:47 PM
cannot copy and paste worksheets or workbooks Tim Excel Discussion (Misc queries) 1 March 29th 05 07:17 PM
copy/paste data between worksheets Anthony Excel Discussion (Misc queries) 0 February 5th 05 12:31 AM


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