Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / October 2003

Tip: Looking for answers? Try searching our database.

copying text across worksheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roxy - 14 Oct 2003 14:00 GMT
I have to add a column of text (5 codes) to my totals page
in my workbook.  I also need this column containing the
new codes on the other 120 worksheets in the same workbook
(in the same place).  Is there a way to do it once that it
will update the other pages or am I looking at a lot of
cutting and pasting?  

Thanks.
John Hayes - 14 Oct 2003 14:18 GMT
This should work.

Tools....Macros...VisualBasic Editor
Click on your Workbook in the Project Explorer and Select

Insert..Module

Doubleclick on the new module and type the following (or
copy and paste it from here)

Dim mysht as Worksheet

For each mysht in thiswokbook.sheets
   with mysht
      .columns(1).insert '1 to insert it at column A
      .cells(1,1)="code1" ' Cell A1 gets this text
      .cells(2,1)="Code2" ' Cell A2 gets this text
      .cells(3,1)="Code3" ' Cell A3
      .cells(4,1)="Code4" ' Cell A4
      .cells(5,1)="Code5" ' Cell A5
   

next

>-----Original Message-----
>I have to add a column of text (5 codes) to my totals page
[quoted text clipped - 6 lines]
>Thanks.  
>.
John HAyes - 14 Oct 2003 14:31 GMT
Original code didn't close the With Statement
This one is correct

Dim mysht as Worksheet

For each mysht in thiswokbook.sheets
   with mysht
      .columns(1).insert '1 to insert it at column A
      .cells(1,1)="code1" ' Cell A1 gets this text
      .cells(2,1)="Code2" ' Cell A2 gets this text
      .cells(3,1)="Code3" ' Cell A3
      .cells(4,1)="Code4" ' Cell A4
      .cells(5,1)="Code5" ' Cell A5
   
   END WITH

next

>-----Original Message-----
>This should work.
[quoted text clipped - 36 lines]
>>
>.
Roxy - 15 Oct 2003 16:36 GMT
My user completed the following steps and got it to work
without having to utilize VB.  

If you've already entered data on one worksheet, you can
quickly copy the data to corresponding cells on other
sheets.

Select the sheet that contains the data and the sheets to
which you want to copy the data.
Select the cells that contain the data you want to copy.
On the Edit menu, point to Fill, and then click Across
Worksheets.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.