Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Dealing with Worksheet Names

I'm trying to copy from various parts of a succession of worksheets. Everything is in the same file.


My worksheets are named 1,2,3,4,5
I want to copy the contents from C4 in worksheets 2,3,4,5 into column 3 in WS1; then I want to copy the contents from C6 to column 4.

It's been a horror show - I'm dealing with formulas like ='[C3]1'$C$4 and each cell has to vertify the directory & file.

Please help...

Jim Berglund
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Dealing with Worksheet Names

One way:

Public Sub CopyC4sAndC6sToSheet1()
Dim rDest As Range
Dim i As Long
Set rDest = Sheets("1").Range("C1")
For i = 2 To 5
With Sheets(CStr(i))
rDest.Offset(i - 2, 0).Value = .Range("C4").Value
rDest.Offset(i - 2, 1).Value = .Range("C6").Value
End With
Next i
End Sub




In article <C2oRe.346282$s54.294776@pd7tw2no,
"Jim Berglund" wrote:

I'm trying to copy from various parts of a succession of worksheets.
Everything is in the same file.


My worksheets are named 1,2,3,4,5
I want to copy the contents from C4 in worksheets 2,3,4,5 into column 3 in
WS1; then I want to copy the contents from C6 to column 4.

It's been a horror show - I'm dealing with formulas like ='[C3]1'$C$4 and
each cell has to vertify the directory & file.

Please help...

Jim Berglund

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
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
MAKE A LIST OF NAMES FROM REPEATED NAMES IN THE SAME WORKSHEET r.kordahi Excel Discussion (Misc queries) 2 January 3rd 09 08:10 AM
Dealing with worksheet groups Bob K Excel Worksheet Functions 0 October 19th 05 04:08 PM
Changing VB Component Names to match Worksheet names using VBE Philip Excel Programming 1 April 12th 05 05:37 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


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