Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sum accross worksheets using names | Excel Worksheet Functions | |||
same range names in different worksheets | Excel Worksheet Functions | |||
names in different worksheets | Excel Worksheet Functions | |||
Compare names on two worksheets | New Users to Excel | |||
Names and Separate Worksheets | Excel Worksheet Functions |