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

Hi all,
I am using a set of excel sheets to do some costing.
Because I have multiple sheets ( changes every project ) I
was hoping to write some code to copy the fields from each
sheet ( let just say A3 ) to the final costing sheet. To
do this I thought about assigning a variable to the name
of each sheet and using the variable to wite the formula.
Unfortunately I have trouble with the assigning of the
variable to the sheet name. I started with something
similar to this

For i = 1 To Worksheets.Count
tmpName = "sheets" & i
SName = Worksheets(tmpName).Name
does a) anybody understand my problem and b) can anyone
help
Thanks in Advance
MM

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Names of worksheets

Mac,
Try

Sub checkData()
For a = 1 To Sheets.Count
Range("K" & a) = Sheets(a).Range("A3").Value
Next a
End Sub

if the final costing sheet is the last one of the book
you can use
For a = 1 To Sheets.Count - 1
to get the values of the rest
HTH
Cecil


"Mac" wrote in message
...
Hi all,
I am using a set of excel sheets to do some costing.
Because I have multiple sheets ( changes every project ) I
was hoping to write some code to copy the fields from each
sheet ( let just say A3 ) to the final costing sheet. To
do this I thought about assigning a variable to the name
of each sheet and using the variable to wite the formula.
Unfortunately I have trouble with the assigning of the
variable to the sheet name. I started with something
similar to this

For i = 1 To Worksheets.Count
tmpName = "sheets" & i
SName = Worksheets(tmpName).Name
does a) anybody understand my problem and b) can anyone
help
Thanks in Advance
MM



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
sum accross worksheets using names ShaunL Excel Worksheet Functions 1 December 4th 09 02:38 AM
same range names in different worksheets tabell88 Excel Worksheet Functions 4 March 3rd 09 02:47 AM
names in different worksheets a m spock Excel Worksheet Functions 2 January 6th 09 07:34 AM
Compare names on two worksheets egreen New Users to Excel 1 October 8th 07 07:41 PM
Names and Separate Worksheets Memento Excel Worksheet Functions 4 May 9th 07 01:20 AM


All times are GMT +1. The time now is 06:42 AM.

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"